Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
logging Namespace Reference

Handles the initialization and deinitialization of the logging system. More...

Classes

class  deinit_t
class  min_max_avg_periodic_logger
 A helper class for tracking and logging numerical values across a period of time. More...
class  time_delta_periodic_logger
 A helper class for tracking and logging short time intervals across a period of time. More...

Functions

void deinit ()
 Deinitialize the logging system.
void formatter (const boost::log::record_view &view, boost::log::formatting_ostream &os)
std::unique_ptr< deinit_t > init (int min_log_level, const std::string &log_file)
 Initialize the logging system.
void setup_av_logging (int min_log_level)
 Setup AV logging.
void setup_libdisplaydevice_logging (int min_log_level)
 Setup logging for libdisplaydevice.
void log_flush ()
 Flush the log.
void print_help (const char *name)
 Print help to stdout.
std::string bracket (const std::string &input)
 Enclose string in square brackets.
std::wstring bracket (const std::wstring &input)
 Enclose string in square brackets.

Detailed Description

Handles the initialization and deinitialization of the logging system.

Function Documentation

◆ bracket() [1/2]

std::string logging::bracket ( const std::string & input)

Enclose string in square brackets.

Parameters
inputInput string.
Returns
Enclosed string.

Definition at line 233 of file logging.cpp.

◆ bracket() [2/2]

std::wstring logging::bracket ( const std::wstring & input)

Enclose string in square brackets.

Parameters
inputInput string.
Returns
Enclosed string.

Definition at line 237 of file logging.cpp.

◆ deinit()

void logging::deinit ( )

Deinitialize the logging system.

Examples

void deinit()
Deinitialize the logging system.
Definition logging.cpp:53

Definition at line 53 of file logging.cpp.

◆ formatter()

void logging::formatter ( const boost::log::record_view & view,
boost::log::formatting_ostream & os )

Definition at line 59 of file logging.cpp.

◆ init()

std::unique_ptr< deinit_t > logging::init ( int min_log_level,
const std::string & log_file )
nodiscard

Initialize the logging system.

Parameters
min_log_levelThe minimum log level to output.
log_fileThe log file to write to.
Returns
An object that will deinitialize the logging system when it goes out of scope.

Examples

log_init(2, "sunshine.log");

Definition at line 104 of file logging.cpp.

◆ log_flush()

void logging::log_flush ( )

Flush the log.

Examples

void log_flush()
Flush the log.
Definition logging.cpp:205

Definition at line 205 of file logging.cpp.

◆ print_help()

void logging::print_help ( const char * name)

Print help to stdout.

Parameters
nameThe name of the program.

Examples

print_help("sunshine");
void print_help(const char *name)
Print help to stdout.
Definition logging.cpp:211

Definition at line 211 of file logging.cpp.

◆ setup_av_logging()

void logging::setup_av_logging ( int min_log_level)

Setup AV logging.

Parameters
min_log_levelThe log level.

Definition at line 147 of file logging.cpp.

◆ setup_libdisplaydevice_logging()

void logging::setup_libdisplaydevice_logging ( int min_log_level)

Setup logging for libdisplaydevice.

Parameters
min_log_levelThe log level.

Definition at line 175 of file logging.cpp.