#include <XrdSsiLogger.hh>
|
static void | Msg (const char *pfx, const char *txt1, const char *txt2=0, const char *txt3=0) |
|
static void | Msgf (const char *pfx, const char *fmt,...) |
|
static void | Msgv (const char *pfx, const char *fmt, va_list aP) |
|
static void | Msgv (struct iovec *iovP, int iovN) |
|
static bool | SetMCB (MCB_t &mcbP, mcbType mcbt=mcbAll) |
|
static const char * | TBeg () |
|
static void | TEnd () |
|
◆ MCB_t
typedef void() XrdSsiLogger::MCB_t(struct timeval const &mtime, unsigned long tID, const char *msg, int mlen) |
Length of message text.
Set a message callback function for messages issued via this object. This method should be called during static initialization (this means the call needs to occur at global scope).
- Parameters
-
mCB | Reference to the message callback function as defined by the typedef MCB_t. |
mcbt | Specifies the type of callback being set, as follows: mcbAll - callback for client-side and server-side logging. mcbClient - Callback for client-side logging. mcbServer - Callback for server-side logging. |
- Returns
- bool A value of true indicates success, otherwise false returned. The return value can generally be ignored and is provided as a means to call this method via dynamic global initialization.
◆ mcbType
Enumerator |
---|
mcbAll | |
mcbClient | |
mcbServer | |
◆ XrdSsiLogger()
XrdSsiLogger::XrdSsiLogger |
( |
| ) |
|
|
inline |
Constructor and destructor.
◆ ~XrdSsiLogger()
XrdSsiLogger::~XrdSsiLogger |
( |
| ) |
|
|
inline |
◆ Msg()
static void XrdSsiLogger::Msg |
( |
const char * |
pfx, |
|
|
const char * |
txt1, |
|
|
const char * |
txt2 = 0 , |
|
|
const char * |
txt3 = 0 |
|
) |
| |
|
static |
Insert a space delimited error message into the log file.
- Parameters
-
pfx | !0 -> the text to prefix the message; the message is formed as <timestamp> pfx: txt1 [txt2] [txt3]
pfx =0 -> add message to the log without a time stamp or prefix. |
txt1,txt2,txt3 | the message to be added to the log. |
◆ Msgf()
static void XrdSsiLogger::Msgf |
( |
const char * |
pfx, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Insert a formated error message into the log file using variable args.
- Parameters
-
pfx | !0 -> the text to prefix the message; the message is formed as <timestamp> <pfx>: <formated_text>
pfx =0 -> add message to the log without a time stamp or prefix. |
fmt | the message formatting template (i.e. sprintf format). Note that a newline character is always appended to the message. |
... | the arguments that should be used with the template. The formatted message is truncated at 2048 bytes. |
◆ Msgv() [1/2]
static void XrdSsiLogger::Msgv |
( |
const char * |
pfx, |
|
|
const char * |
fmt, |
|
|
va_list |
aP |
|
) |
| |
|
static |
Insert a formated error message into the log file using a va_list.
- Parameters
-
pfx | !0 -> the text to prefix the message; the message is formed as <timestamp> <pfx>: <formated_text>
pfx =0 -> add message to the log without a time stamp or prefix. |
fmt | the message formatting template (i.e. sprintf format). Note that a newline character is always appended to the message. |
aP | the arguments that should be used with the template. The formatted message is truncated at 2048 bytes. |
◆ Msgv() [2/2]
static void XrdSsiLogger::Msgv |
( |
struct iovec * |
iovP, |
|
|
int |
iovN |
|
) |
| |
|
static |
Insert a formated error message into the log file using a iovec.
- Parameters
-
iovP | pointer to an iovec that contains the message. that a newline character is always appended to the message. |
iovN | the number of elements in the iovec. |
◆ SetMCB()
◆ TBeg()
static const char * XrdSsiLogger::TBeg |
( |
| ) |
|
|
static |
◆ TEnd()
static void XrdSsiLogger::TEnd |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: