#include <Logger.hpp>
Logger class contains static methods to deal with log configuration.
static void Pothos::System::Logger::forwardStdIoToLogging |
( |
const std::string & |
source | ) |
|
|
static |
Redirect standard IO to the logging facility. This allows the user to capture standard IO debug messages from subprocesses and servers that would otherwise be lost. Because the default logging output directs to standard IO, it is recommended to first change the default logging channel. For example, startSyslogForwarding() will direct logs to UDP.
- Parameters
-
source | the repoted source of the forwarded log messages |
static void Pothos::System::Logger::setupDefaultLogging |
( |
void |
| ) |
|
|
static |
Setup default logging for this process. The default logger will log all non-informational logs to the console. The logger can be configured with the following environment vars: POTHOS_LOG_LEVEL - what level to display logs (default notice) POTHOS_LOG_CHANNEL - how to display the logs (default color) POTHOS_LOG_FILE - log file path if POTHOS_LOG_CHANNEL=file specified
static void Pothos::System::Logger::startSyslogForwarding |
( |
const std::string & |
addr | ) |
|
|
static |
Start syslog forwarding to the given address.
- Parameters
-
addr | the log destination in host:port format |
static std::string Pothos::System::Logger::startSyslogListener |
( |
void |
| ) |
|
|
static |
Start a listener for syslog messages from other processes. The log messages will be forwarded to the default logger.
- Returns
- the port that this process is listening
static void Pothos::System::Logger::stopSyslogForwarding |
( |
void |
| ) |
|
|
static |
static void Pothos::System::Logger::stopSyslogListener |
( |
void |
| ) |
|
|
static |
Stop the syslog listener service.
The documentation for this class was generated from the following file: