|
Flyby SDK v1.0.2
|
The base logger class. More...
#include <log.h>
Public Member Functions | |
| Logger (const std::string &filepath) | |
| Constructs a logger that writes to a file. | |
| Logger (std::shared_ptr< Publisher > publisher) | |
| Constructs a logger that writes to the message bus. | |
| Logger (std::shared_ptr< Publisher > publisher, const std::string &filepath) | |
| Constructs a logger that writes to the message bus and to a file. | |
| void | set_stdout (bool allow_stdout) |
| Allow/stop the logger from outputting to stdout. | |
| void | set_log_level (LogLevel level) |
| Sets the current log level. | |
| virtual void | log (LogLevel level, const std::string &message) |
| Logs a message at a log level. | |
| virtual void | log (LogLevel level, const std::string &tag, const std::string &message) |
| Logs a message at a log level. | |
| virtual void | d (const std::string &message) |
| Logs a message at the debug log level. | |
| virtual void | d (const std::string &tag, const std::string &message) |
| Logs a message at the debug log level. | |
| virtual void | i (const std::string &message) |
| Logs a message at the info log level. | |
| virtual void | i (const std::string &tag, const std::string &message) |
| Logs a message at the info log level. | |
| virtual void | w (const std::string &message) |
| Logs a message at the warning log level. | |
| virtual void | w (const std::string &tag, const std::string &message) |
| Logs a message at the warning log level. | |
| virtual void | e (const std::string &message) |
| Logs a message at the error log level. | |
| virtual void | e (const std::string &tag, const std::string &message) |
| Logs a message at the error log level. | |
Protected Member Functions | |
| Logger () | |
| Constructs an empty logger. | |
The base logger class.
|
explicit |
Constructs a logger that writes to a file.
| filepath | - The path where the log should be stored |
|
explicit |
Constructs a logger that writes to the message bus.
| publisher | - The message bus publisher |
|
explicit |
Constructs a logger that writes to the message bus and to a file.
| publisher | - The message bus publisher |
| filepath | - The path where the log should be stored |
|
protected |
Constructs an empty logger.
Used for mocking and testing
|
virtual |
Logs a message at the debug log level.
| message | - The message to log |
|
virtual |
Logs a message at the debug log level.
| tag | - The tag of the log |
| message | - The message to log |
|
virtual |
Logs a message at the error log level.
| message | - The message to log |
|
virtual |
Logs a message at the error log level.
| tag | - The tag of the log |
| message | - The message to log |
|
virtual |
Logs a message at the info log level.
| message | - The message to log |
|
virtual |
Logs a message at the info log level.
| tag | - The tag of the log |
| message | - The message to log |
|
virtual |
Logs a message at a log level.
| level | - The log level |
| message | - The message to log |
|
virtual |
Logs a message at a log level.
| level | - The log level |
| tag | - The tag of the log |
| message | - The message to log |
| void flyby::Logger::set_log_level | ( | LogLevel | level | ) |
Sets the current log level.
| level | - The log level |
| void flyby::Logger::set_stdout | ( | bool | allow_stdout | ) |
Allow/stop the logger from outputting to stdout.
| allow_stdout | - if set to true, logger will output to stdout |
|
virtual |
Logs a message at the warning log level.
| message | - The message to log |
|
virtual |
Logs a message at the warning log level.
| tag | - The tag of the log |
| message | - The message to log |