Logger client that redirects messages to a file.
More...
#include <geogram/basic/logger.h>
|
| | FileLogger () |
| | Creates an empty file logger.
|
| |
| | FileLogger (const std::string &file_name) |
| | Creates logger that logs messages to a file.
|
| |
| void | div (const std::string &title) override |
| | Creates a new division.
|
| |
| void | out (const std::string &str) override |
| | Handles an information message.
|
| |
| void | warn (const std::string &str) override |
| | Handles a warning message.
|
| |
| void | err (const std::string &str) override |
| | Handles an error message.
|
| |
| void | status (const std::string &str) override |
| | Handles a status message.
|
| |
|
| ~LoggerClient () override |
| | LoggerClient destructor.
|
| |
| void | ref () const |
| | Increments the reference count.
|
| |
| void | unref () const |
| | Decrements the reference count.
|
| |
| bool | is_shared () const |
| | Check if the object is shared.
|
| |
| int | nb_refs () const |
| | Gets the number of references that point to this object.
|
| |
|
|
| ~FileLogger () override |
| | FileLogger destructor.
|
| |
| void | set_file_name (const std::string &file_name) |
| | Sets the log file name.
|
| |
| | Counted () |
| | Creates a reference counted object.
|
| |
| virtual | ~Counted () |
| | Destroys a reference counted object.
|
| |
|
| static void | ref (const Counted *counted) |
| | Increments the reference count.
|
| |
| static void | unref (const Counted *counted) |
| | Decrements the reference count.
|
| |
Logger client that redirects messages to a file.
Definition at line 248 of file logger.h.
◆ FileLogger() [1/2]
| GEO::FileLogger::FileLogger |
( |
| ) |
|
Creates an empty file logger.
The default constructed file logger does not handle messages until it is set a filename with set_file_name()
◆ FileLogger() [2/2]
| GEO::FileLogger::FileLogger |
( |
const std::string & |
file_name | ) |
|
Creates logger that logs messages to a file.
All sent to the file logger are sent to the file file_name.
- Parameters
-
| [in] | file_name | name of the log file |
◆ div()
| void GEO::FileLogger::div |
( |
const std::string & |
title | ) |
|
|
overridevirtual |
Creates a new division.
This creates a new division entitled with title
- Parameters
-
| [in] | title | the text of the title |
Implements GEO::LoggerClient.
◆ err()
| void GEO::FileLogger::err |
( |
const std::string & |
str | ) |
|
|
overridevirtual |
Handles an error message.
- Parameters
-
| [in] | str | the text of the message |
Implements GEO::LoggerClient.
◆ out()
| void GEO::FileLogger::out |
( |
const std::string & |
str | ) |
|
|
overridevirtual |
Handles an information message.
- Parameters
-
| [in] | str | the text of the message |
Implements GEO::LoggerClient.
◆ set_file_name()
| void GEO::FileLogger::set_file_name |
( |
const std::string & |
file_name | ) |
|
|
protected |
Sets the log file name.
If the client already had a file name, the corresponding file stream is closed and reopened with file_name.
- Parameters
-
| [in] | file_name | the name of the log file |
◆ status()
| void GEO::FileLogger::status |
( |
const std::string & |
str | ) |
|
|
overridevirtual |
Handles a status message.
- Parameters
-
| [in] | str | the text of the message This function does actually nothing |
Implements GEO::LoggerClient.
◆ warn()
| void GEO::FileLogger::warn |
( |
const std::string & |
str | ) |
|
|
overridevirtual |
Handles a warning message.
- Parameters
-
| [in] | str | the text of the message |
Implements GEO::LoggerClient.
The documentation for this class was generated from the following file: