Defined in file: hzProcess.h
The hzLogger class manages a 'log channel'. Instead of writing to a logfile applications write to a hzLogger instance. This usually is a file but it might be a logserver instance (socket program)
Constructors/Detructors
| hzLogger* | hzLogger | (hzLogger& never) | |
| hzLogger* | hzLogger | (void) | |
| NULL-TYPE | hzLogger | (void) | hzLogger constructor. Initialize logger, and set the logger for the thread to this logger. |
| void | ~hzLogger | (void) | |
| NULL-TYPE | ~hzLogger | (void) | hzLogger destructor. There is currently no de-registration facility. |
Public Methods:
| hzEcode | Close | (void) | Close a log channel and remove it from the thread-logger table. Arguments: None |
| bool | IsOpen | (void) | |
| bool | IsVerbose | (void) | |
| hzEcode | Log | (hzChain& Z) | Writes out the supplied chain to the logfile 'as is' with no time-stamp or other supporting information. |
| hzEcode | Log | (const char* va_alist) | Log a variable argument message to the log channel. Deprecated as the hzFuncname class is to be reviewed. |
| hzEcode | Logr | (hzEcode rc)const char* va_alist, | Log a variable argument message to the log channel. Deprecated as the hzFuncname class is to be reviewed. |
| hzEcode | OpenFile | (const char* fpath)hzLogRotate eRotate, | Purpose: Open a LogChannel to use a file regime |
| hzEcode | OpenPrivate | (const char* fpath)hzLogRotate eRotate, uint32_t nPerms, | Purpose: Open a LogChannel to use a private logserver file |
| hzEcode | OpenPublic | (const char* fpath)hzLogRotate eRotate, | Purpose: Open a LogChannel to use a public logfile |
| hzEcode | Out | (hzChain& Z) | Writes out the supplied chain to the logfile 'as is' with no time-stamp or other supporting information. |
| hzEcode | Out | (const char* va_alist) | Writes out the supplied character string with varags to the logfile 'as is' with no time-stamp or other supporting information. |
| void | SetIndent | (uint16_t nIndent) | |
| void | Verbose | (bool bVerbose) | |
| void | _logrotate | (void) | Private method to change the hzLogger output file so as to seperate logfiles into approapriate time periods. Arguments: None Returns: None |
| hzEcode | _write | (uint32_t nBytes) | Private support function to unify logfile writing to either a logfile or a virtual logfile managed by the logserver. |
Overloaded operators:
| hzLogger& | operator<< | (hzChain& Z) | Stream operator so that an entire hzChain contents can be output to the logfile. |
| hzLogger& | operator<< | (hzString& S) | Stream operator so that a hzString can be output to the logfile. |
| hzLogger& | operator<< | (const char* str) | Stream operator so that a char string can be output to the logfile. |
| hzLogger& | operator= | (hzLogger& never) |
Member Variables:
| hzString | m_Base | Basename of logfile | |
| hzString | m_File | Full name of logfile | |
| hzLockS | m_Lock | Mutex (if required) | |
| bool | m_bVerbose | Send log messages to stdin as well as file | |
| char* | m_cvData | Buffer for preparation of log message | |
| hzXDate | m_datCurr | Current date & time | |
| hzXDate | m_datLast | Last date & time rotation occured | |
| hzLogRotate | m_eRotate | Log rotate edict | |
| uint16_t | m_nIndent | No of tabs to indent | |
| uint16_t | m_nSessID | Session ID | |
| hzTcpClient* | m_pConnection | Connection as client to logserver | |
| unsigned char* | m_pData | Buffer for preparation of log message | |
| char* | m_pDataPtr | Set at m_cvData or an offset to allow packet hdr | |
| FILE* | m_pFile | The active logfile |