Syslog format logging class. Default output is to stdout. More...
#include <Log.h>
Classes | |
| class | LogEntry |
| class | LogServerInfo |
| class | OutputConfig |
Public Types | |
| enum | _Severity { SevEmergency = 0, SevAlert = 1, SevCritical = 2, SevError = 3, SevWarning = 4, SevNotice = 5, SevInfo = 6, SevDebug = 7 } |
| enum | _Facility { FacKernal = 0, FacUser = 1, FacMail = 2, FacDaemon = 3, FacAuthentication = 4, FacSyslog = 5, FacPrinter = 6, FacNews = 7, FacUUCP = 8, FacCron1 = 9, FacAuthorization = 10, FacFTP = 11, FacNTP = 12, FacLogAudit = 13, FacLogAlert = 14, FacCron2 = 15, FacLocal0 = 16, FacLocal1 = 17, FacLocal2 = 18, FacLocal3 = 19, FacLocal4 = 20, FacLocal5 = 21, FacLocal6 = 22, FacLocal7 = 23 } |
| enum | _LogType { LogToNone = 0, LogToConsole = 1<<1, LogToFile = 1<<2, LogToServer = 1<<3 } |
| typedef enum Log::_Severity | Severity |
| typedef enum Log::_Facility | Facility |
| typedef enum Log::_LogType | LogType |
Public Member Functions | |
| Log (Facility facility, LogType logType) | |
| Log (const Log &l) | |
| Log & | operator= (const Log &l) |
| void | AddServer (const String &hostName, int port=514) |
| void | AddServer (const String &hostName, OutputConfig cf, int port=514) |
| void | DoLogEmergency () |
| void | DoLogAlert () |
| void | DoLogCritical () |
| void | DoLogError () |
| void | DoLogWarning () |
| void | DoLogNotice () |
| void | DoLogInfo () |
| void | DoLogDebug () |
| void | DontLogEmergency () |
| void | DontLogAlert () |
| void | DontLogCritical () |
| void | DontLogError () |
| void | DontLogWarning () |
| void | DontLogNotice () |
| void | DontLogInfo () |
| void | DontLogDebug () |
| void | SetLogType (LogType lt) |
| void | SetFacility (Facility facility) |
| virtual void | Write (const LogEntry &le) |
| void | Write (const OutOfMemoryException &mex) |
| void | Write (Exception *ex) |
| void | Write (Severity severity, const String &message) |
| void | Write (Severity severity, Facility facility, const String &process, const String &message) |
| void | Write (Severity severity, Facility facility, const String &process, int pid, const String &message) |
| void | Write (Severity severity, Facility facility, const String &host, const String &process, int pid, const String &message) |
| void | WriteError (const String &message) |
| void | WriteWarn (const String &message) |
| void | WriteInfo (const String &msg) |
| int | GetMessageCount () const |
| void | CheckMem () const |
| void | ValidateMem () const |
Static Public Member Functions | |
| static void | SSetLogType (LogType lt) |
| static void | SSetLogFileName (const String &filename) |
| static void | SSetSyslogServer (const String &server) |
| static void | SSetStaticSyslogPort (int port) |
| static void | SWrite (const OutOfMemoryException &mex) |
| static void | SWrite (Exception *ex) |
| static void | SWrite (Severity severity, const String &message) |
| static void | SWrite (Severity severity, Facility facility, const String &process, const String &message) |
| static void | SWrite (Severity severity, Facility facility, const String &process, int pid, const String &message) |
| static void | SWrite (Severity severity, Facility facility, const String &host, const String &process, int pid, const String &message) |
| static void | SWriteError (const String &message) |
| static void | SWriteWarn (const String &message) |
| static void | SWriteInfo (const String &msg) |
| static int | SMessageCount () |
| static void | SWriteOkFail (const String &msg) |
| static void | SWriteEndOfRunTotal () |
Protected Member Functions | |
| bool | DoLog (const LogEntry &le) |
Static Protected Member Functions | |
| static bool | _LogDoLog (const Log::LogEntry &le, Log::OutputConfig m_msgToLog) |
| static void | SWrite (const LogEntry &le) |
Protected Attributes | |
| Facility | m_facility |
| int | m_logType |
| int | m_messageCount |
| String | m_fileName |
| List< LogServerInfo > | m_servers |
| OutputConfig | m_msgToLog |
Static Protected Attributes | |
| static char | m_staticFileName [512] = {0} |
| static char | m_staticServerName [128] = {0} |
| static int | m_staticServerPort = 514 |
| static volatile int | m_staticMessageCount = 0 |
| static volatile int | m_staticOldMsgCount = 0 |
| static int | m_staticLogType = Log::LogToConsole |
Syslog format logging class. Default output is to stdout.
Definition at line 41 of file Log.h.