XrdSsiLogger Class Reference
#include <XrdSsiLogger.hh>
List of all members.
Public Types |
enum | mcbType { mcbAll = 0,
mcbClient,
mcbServer
} |
typedef void( | MCB_t )(struct timeval const &mtime, unsigned long tID, const char *msg, int mlen) |
| Length of message text.
|
Public Member Functions |
| XrdSsiLogger () |
| Constructor and destructor.
|
| ~XrdSsiLogger () |
Static Public Member Functions |
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 () |
Member Typedef Documentation
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.
Member Enumeration Documentation
- Enumerator:
mcbAll |
|
mcbClient |
|
mcbServer |
|
Constructor & Destructor Documentation
XrdSsiLogger::XrdSsiLogger |
( |
|
) |
[inline] |
Constructor and destructor.
XrdSsiLogger::~XrdSsiLogger |
( |
|
) |
[inline] |
Member Function Documentation
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. |
| msg | the message to added to the log. |
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. |
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. |
| iobN | the number of elements in the iovec. |
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. |
static bool XrdSsiLogger::SetMCB |
( |
MCB_t & |
mcbP, |
|
|
mcbType |
mcbt = mcbAll | |
|
) |
| | [static] |
static const char* XrdSsiLogger::TBeg |
( |
|
) |
[static] |
static void XrdSsiLogger::TEnd |
( |
|
) |
[static] |
The documentation for this class was generated from the following file: