Used to log information or events in some logging category.
More...
|
| PvLogger (const PvString &aCategory) |
| Constructor. More...
|
|
virtual | ~PvLogger () |
| Destructor.
|
|
void | LogInfo (const char *aFile, int aLine, const char *aFunction, const char *aMessage) |
| Add an info-level event to the log. More...
|
|
void | LogError (const char *aFile, int aLine, const char *aFunction, const char *aMessage) |
| Add an error-level event to the log. More...
|
|
void | LogWarning (const char *aFile, int aLine, const char *aFunction, const char *aMessage) |
| Add a warning-level event to the log. More...
|
|
void | LogCritical (const char *aFile, int aLine, const char *aFunction, const char *aMessage) |
| Add a critical-level event to the log. More...
|
|
void | LogDebug (const char *aFile, int aLine, const char *aFunction, const char *aMessage) |
| Add a debug-level event to the log. More...
|
|
Used to log information or events in some logging category.
◆ PvLogger()
PvLogger::PvLogger |
( |
const PvString & |
aCategory | ) |
|
Constructor.
Logging can be performed using the Log methods of this class but is usually performed using the PV_LOGINFO, PV_LOGERROR, PV_LOGWARNING, PV_LOGCRITICAL and PV_LOGDEBUG macros..
When using these macros, the first message parameter has to be a string. Other parameters are specific as a stream which can be strings, integers, floats and format objects of the PvFormat namespace.
PV_LOGINFO( lLogger, "An error with result code " << 42 << " has occured" );
PV_LOGINFO( lLogger, "123 test " << std::hex << 16 );
PV_LOGINFO( lLogger, "123 test " << std::oct << 16 );
PV_LOGINFO( lLogger, "123 test " << std::dec << 16 );
PV_LOGINFO( lLogger, "123 test " << std::cout.precision( 4 ) << 3.14159265 );
PV_LOGINFO( lLogger, "123 test " << std::cout.width( 4 ) << std::cout.width( '*' ) << 16 );
- Parameters
-
[in] | aCategory | The logging category. |
◆ LogCritical()
void PvLogger::LogCritical |
( |
const char * |
aFile, |
|
|
int |
aLine, |
|
|
const char * |
aFunction, |
|
|
const char * |
aMessage |
|
) |
| |
Add a critical-level event to the log.
- Parameters
-
[in] | aFile | File from which logging occured (usually FILE) |
[in] | aLine | Line from which logging occured (usually LINE) |
[in] | aFunction | Function from which logging occured (usually FUNCTION) |
[in] | aMessage | Log message |
◆ LogDebug()
void PvLogger::LogDebug |
( |
const char * |
aFile, |
|
|
int |
aLine, |
|
|
const char * |
aFunction, |
|
|
const char * |
aMessage |
|
) |
| |
Add a debug-level event to the log.
- Parameters
-
[in] | aFile | File from which logging occured (usually FILE) |
[in] | aLine | Line from which logging occured (usually LINE) |
[in] | aFunction | Function from which logging occured (usually FUNCTION) |
[in] | aMessage | Log message |
◆ LogError()
void PvLogger::LogError |
( |
const char * |
aFile, |
|
|
int |
aLine, |
|
|
const char * |
aFunction, |
|
|
const char * |
aMessage |
|
) |
| |
Add an error-level event to the log.
- Parameters
-
[in] | aFile | File from which logging occured (usually FILE) |
[in] | aLine | Line from which logging occured (usually LINE) |
[in] | aFunction | Function from which logging occured (usually FUNCTION) |
[in] | aMessage | Log message |
◆ LogInfo()
void PvLogger::LogInfo |
( |
const char * |
aFile, |
|
|
int |
aLine, |
|
|
const char * |
aFunction, |
|
|
const char * |
aMessage |
|
) |
| |
Add an info-level event to the log.
- Parameters
-
[in] | aFile | File from which logging occured (usually FILE) |
[in] | aLine | Line from which logging occured (usually LINE) |
[in] | aFunction | Function from which logging occured (usually FUNCTION) |
[in] | aMessage | Log message |
◆ LogWarning()
void PvLogger::LogWarning |
( |
const char * |
aFile, |
|
|
int |
aLine, |
|
|
const char * |
aFunction, |
|
|
const char * |
aMessage |
|
) |
| |
Add a warning-level event to the log.
- Parameters
-
[in] | aFile | File from which logging occured (usually FILE) |
[in] | aLine | Line from which logging occured (usually LINE) |
[in] | aFunction | Function from which logging occured (usually FUNCTION) |
[in] | aMessage | Log message |
The documentation for this class was generated from the following files: