MythTV  master
Public Member Functions | Protected Attributes | List of all members
LoggerBase Class Referenceabstract

Base class for the various logging mechanisms. More...

#include <loggingserver.h>

Inheritance diagram for LoggerBase:
Inheritance graph
[legend]
Collaboration diagram for LoggerBase:
Collaboration graph
[legend]

Public Member Functions

 LoggerBase (const char *string)
 LoggerBase Constructor. More...
 
virtual ~LoggerBase ()
 LoggerBase Deconstructor. More...
 
virtual bool logmsg (LoggingItem *item)=0
 Process a log message for the logger instance. More...
 
virtual void reopen (void)=0
 Reopen the log file to facilitate log rolling. More...
 
virtual void stopDatabaseAccess (void)
 Stop logging to the database. More...
 

Protected Attributes

char * m_handle {nullptr}
 semi-opaque handle for identifying instance More...
 

Detailed Description

Base class for the various logging mechanisms.

Definition at line 27 of file loggingserver.h.

Constructor & Destructor Documentation

◆ LoggerBase()

LoggerBase::LoggerBase ( const char *  string)
explicit

LoggerBase Constructor.

LoggerBase class constructor.

Adds the new logger instance to the loggerMap.

Parameters
stringa C-string of the handle for this instance (NULL if unused)

Definition at line 93 of file loggingserver.cpp.

◆ ~LoggerBase()

LoggerBase::~LoggerBase ( )
virtual

LoggerBase Deconstructor.

LoggerBase deconstructor.

Removes the logger instance from the loggerMap.

Definition at line 111 of file loggingserver.cpp.

Member Function Documentation

◆ logmsg()

virtual bool LoggerBase::logmsg ( LoggingItem item)
pure virtual

Process a log message for the logger instance.

Parameters
itemLoggingItem containing the log message to process

Implemented in DatabaseLogger, SyslogLogger, and FileLogger.

◆ reopen()

virtual void LoggerBase::reopen ( void  )
pure virtual

Reopen the log file to facilitate log rolling.

Implemented in DatabaseLogger, SyslogLogger, and FileLogger.

◆ stopDatabaseAccess()

virtual void LoggerBase::stopDatabaseAccess ( void  )
inlinevirtual

Stop logging to the database.

Reimplemented in DatabaseLogger.

Definition at line 42 of file loggingserver.h.

Member Data Documentation

◆ m_handle

char* LoggerBase::m_handle {nullptr}
protected

semi-opaque handle for identifying instance

Definition at line 44 of file loggingserver.h.

Referenced by DatabaseLogger::DatabaseLogger(), DatabaseLogger::isDatabaseReady(), FileLogger::reopen(), and FileLogger::~FileLogger().


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