XrdSysLogPI.hh File Reference

#include <stdlib.h>
#include <sys/time.h>
Include dependency graph for XrdSysLogPI.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* XrdSysLogPI_t )(struct timeval const &mtime, unsigned long tID, const char *msg, int mlen)
typedef XrdSysLogPI_t(* XrdSysLogPInit_t )(const char *cfgn, char **argv, int argc)

Typedef Documentation

typedef void(* XrdSysLogPI_t)(struct timeval const &mtime, unsigned long tID, const char *msg, int mlen)

This header file defines the plugin interface used by the logging subsystem. The following function is called for each message. A pointer to the function is returned by XrdSysLogPInit(); see the definition below. The log message function must be thread safe in synchronous mode as any number of threads may call it at the same time. In async mode, only one thread invokes the function for each message.

Parameters:
mtime The time the message was generated. The time value is zero when tID is zero (see below).
tID The thread ID that issued the message (Linux -> gettid()). If tID is zero then the msg was captured from stderr.
msg Pointer to the null-terminaed message text.
mlen Length of the message text (exclusive of null byte).
typedef XrdSysLogPI_t(* XrdSysLogPInit_t)(const char *cfgn, char **argv, int argc)

Initialize and return a pointer to the plugin. This function must reside in the plugin shared library as an extern "C" function. The shared library is library identified by the "-l @library" command line option. This function is called only once during loging initialization.

Parameters:
cfgfn -> Configuration filename (nil if none).
argv -> command line arguments after "-+xrdlog".
argc number of command line arguments in argv.
Returns:
Upon success a pointer of type XrdSysLogPI_t which is the function that handles log messages (see above). Upon failure, a nil pointer should be returned. A sample deinition is shown below.

extern "C" XrdSysLogPI_t XrdSysLogPInit(const char *cfgn, char **argv, int argc) { . . . }

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 5 Apr 2019 for xrootd by  doxygen 1.6.1