File-based logger - used for logfiles and console. More...
#include <logging.h>
Public Member Functions | |
| FileLogger (char *filename, bool progress, int quiet) | |
| FileLogger constructor. | |
| ~FileLogger () | |
| FileLogger deconstructor - close the logfile. | |
| bool | logmsg (LoggingItem *item) |
| Process a log message, writing to the logfile. | |
| void | reopen (void) |
| Reopen the logfile after a SIGHUP. | |
Private Attributes | |
| bool | m_opened |
| true when the logfile is opened | |
| int | m_fd |
| contains the file descriptor for the logfile | |
| bool | m_progress |
| show only LOG_ERR and more important (console only) | |
| int | m_quiet |
| silence the console (console only) | |
File-based logger - used for logfiles and console.
Definition at line 55 of file libmythbase/logging.h.
| FileLogger::FileLogger | ( | char * | filename, | |
| bool | progress, | |||
| int | quiet | |||
| ) |
FileLogger constructor.
| filename | Filename of the logfile. "-" for console logging | |
| progress | Show only messages of LOG_ERR and more important, as the console will be used for progress updates. Console only. | |
| quiet | Do not log to the console. Used for daemon mode. Console only. |
Definition at line 221 of file logging.cpp.
| FileLogger::~FileLogger | ( | ) |
FileLogger deconstructor - close the logfile.
Definition at line 243 of file logging.cpp.
| bool FileLogger::logmsg | ( | LoggingItem * | item | ) | [virtual] |
Process a log message, writing to the logfile.
| item | LoggingItem containing the log message to process |
Implements LoggerBase.
Definition at line 278 of file logging.cpp.
| void FileLogger::reopen | ( | void | ) | [virtual] |
Reopen the logfile after a SIGHUP.
Log files only (no console). This allows for logrollers to be used.
Implements LoggerBase.
Definition at line 260 of file logging.cpp.
bool FileLogger::m_opened [private] |
true when the logfile is opened
Definition at line 62 of file libmythbase/logging.h.
Referenced by FileLogger(), logmsg(), reopen(), and ~FileLogger().
int FileLogger::m_fd [private] |
contains the file descriptor for the logfile
Definition at line 63 of file libmythbase/logging.h.
Referenced by FileLogger(), logmsg(), reopen(), and ~FileLogger().
bool FileLogger::m_progress [private] |
show only LOG_ERR and more important (console only)
Definition at line 64 of file libmythbase/logging.h.
Referenced by FileLogger(), and logmsg().
int FileLogger::m_quiet [private] |
silence the console (console only)
Definition at line 65 of file libmythbase/logging.h.
Referenced by FileLogger(), and logmsg().
1.6.3