Pothos  0.4.0-gd11861cd
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Static Public Member Functions | List of all members
Pothos::System::Logger Class Reference

#include <Logger.hpp>

Static Public Member Functions

static std::string startSyslogListener (void)
 
static void stopSyslogListener (void)
 
static void startSyslogForwarding (const std::string &addr)
 
static void stopSyslogForwarding (void)
 
static void forwardStdIoToLogging (const std::string &source)
 
static void setupDefaultLogging (void)
 

Detailed Description

Logger class contains static methods to deal with log configuration.

Member Function Documentation

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
sourcethe 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
addrthe 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

Stop all syslog forwarding setup by startSyslogForwarding().

static void Pothos::System::Logger::stopSyslogListener ( void  )
static

Stop the syslog listener service.


The documentation for this class was generated from the following file: