Logging routines.
More...
#include <Log.h++>
|
static void | setFileLogFormat (const String &format) |
| Set the log format to be used when logging to a file. More...
|
|
static void | setConsoleLogFormat (const String &format) |
| Set the log format to be used when logging to the console. More...
|
|
static void | setUseConsoleLog (bool flag) |
| Enable or disable logging to the console. More...
|
|
static void | setFileLogger (FileLogger *logger) |
| Set the FileLogger object to use for logging to a file. More...
|
|
static FileLogger * | getFileLogger () |
| Get the FileLogger currently in use for logging to a file. More...
|
|
static void | setConsoleLogger (ConsoleLogger *logger) |
| Set the ConsoleLogger object to use for logging to the console. More...
|
|
static ConsoleLogger * | getConsoleLogger () |
| Get the ConsoleLogger currently in use for logging to the console. More...
|
|
static void | setUseFileLog (bool flag) |
| Enable or disable logging to a file. More...
|
|
static void | setLogFile (const String &dir, const String &name) |
| Set the directory and base name for log files. More...
|
|
static void | setLogFileMaxSize (size_t maxLogSize) |
| Set the maximum size for log files. More...
|
|
static void | setLogFileRotateCount (uint_t rotateCount) |
| Set the rotation log file count. More...
|
|
static void | vlogFile (LogLevel level, const char *file, int line, const char *message, va_list args) |
| Write a log message to the log file, if file logging is enabled. More...
|
|
static void | vlogConsole (LogLevel level, const char *file, int line, const char *message, va_list args) |
| Write a log message to the console, if console logging is enabled. More...
|
|
Logging routines.
Also see the macros Log_debug(), Log_info(), Log_warning(), and Log_error().
- Author
- Mark Lindner
◆ getConsoleLogger()
Get the ConsoleLogger currently in use for logging to the console.
◆ getFileLogger()
Get the FileLogger currently in use for logging to a file.
◆ setConsoleLogFormat()
void setConsoleLogFormat |
( |
const String & |
format | ) |
|
|
static |
Set the log format to be used when logging to the console.
- Parameters
-
◆ setConsoleLogger()
Set the ConsoleLogger object to use for logging to the console.
Any current ConsoleLogger object will be deleted. The passed in object must be heap allocated, and should never be freed by the caller.
◆ setFileLogFormat()
void setFileLogFormat |
( |
const String & |
format | ) |
|
|
static |
Set the log format to be used when logging to a file.
- Parameters
-
◆ setFileLogger()
Set the FileLogger object to use for logging to a file.
Any current FileLogger object will be deleted. The passed in object must be heap allocated, and should never be freed by the caller.
◆ setLogFile()
Set the directory and base name for log files.
- Parameters
-
dir | The directory in which the log file(s) will be created. |
name | The base name for the log file(s). |
◆ setLogFileMaxSize()
void setLogFileMaxSize |
( |
size_t |
maxLogSize | ) |
|
|
static |
Set the maximum size for log files.
- Parameters
-
maxLogSize | The maximum log file size, in kilobytes. |
◆ setLogFileRotateCount()
void setLogFileRotateCount |
( |
uint_t |
rotateCount | ) |
|
|
static |
Set the rotation log file count.
- Parameters
-
rotateCount | The maximum number of backlog files to create. The value must range from 0 to 9, with 0 indicating that log rotation is disabled. |
◆ setUseConsoleLog()
static void setUseConsoleLog |
( |
bool |
flag | ) |
|
|
inlinestatic |
Enable or disable logging to the console.
- Parameters
-
flag | true if logging to the console should be enabled, false otherwise. |
◆ setUseFileLog()
static void setUseFileLog |
( |
bool |
flag | ) |
|
|
inlinestatic |
Enable or disable logging to a file.
- Parameters
-
flag | true if logging to a file should be enabled, false otherwise. |
◆ vlogConsole()
void vlogConsole |
( |
LogLevel |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
message, |
|
|
va_list |
args |
|
) |
| |
|
static |
Write a log message to the console, if console logging is enabled.
◆ vlogFile()
void vlogFile |
( |
LogLevel |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
message, |
|
|
va_list |
args |
|
) |
| |
|
static |
Write a log message to the log file, if file logging is enabled.
◆ LogFunctor
The documentation for this class was generated from the following files: