The SBlogInterface extends the VXIlogInterface to support a listener registration mechanism for sending the logs to the final output stream. This mechanism allows multiple systems to tap on to a single log event so it can be sent both to a file and to a central logging service is desired. Listeners are invoked through callbacks. The callback call is blocking. If a listener is going to do signficant work or invoke functions which may block, for example a socket write, a messsage queue should be implemented so that callback is non-blocking. Failure to do this will impact overall system performance.
Across all streams, SBlog is responsible for automatically supplying the following information for end consumer use:
In addition, for diagnostic logging the SBlog defines a mechanism for enabling/disabling messages on an individual tag basis without requiring a recompile for use by consumers of the diagnostic log. Diagnostic( ) is highly efficient for cases when the tag is disabled: in other words, the lookup for seeing if a tag (an integer) is enabled should be done using a simple array or some other extremely low-overhead mechanism. SBlog provides a way to enable/disable tags on-the-fly (without needing to restart the software).
Each OSB PIK component provides an XML error file which integrators can choose to us (or rewrite) to map error numbers and error key/values to error text. An XSLT transform can do this in an error viewer.
Classes | |
struct | SBlogStream |
SBlog definition of a VXIlogStream. More... | |
struct | SBlogInterface |
SBlog extension interface to the VXIlog interface. More... | |
Typedefs | |
typedef *struct SBlogStream | SBlogStream |
SBlog definition of a VXIlogStream. | |
typedef void | SBlogErrorListener (struct SBlogInterface *pThis, const VXIchar *moduleName, VXIunsigned errorID, time_t timestamp, VXIunsigned timestampMsec, const VXIVector *keys, const VXIVector *values, void *userdata) |
Prototype for error listener notification. | |
typedef void | SBlogDiagnosticListener (struct SBlogInterface *pThis, VXIunsigned tagID, const VXIchar *subtag, time_t timestamp, VXIunsigned timestampMsec, const VXIchar *printmsg, void *userdata) |
Prototype for diagnostic listener notification All diagnostic listener registrants must conform to this signature. | |
typedef void | SBlogEventListener (struct SBlogInterface *pThis, VXIunsigned eventID, time_t timestamp, VXIunsigned timestampMsec, const VXIVector *keys, const VXIVector *values, void *userdata) |
Prototype for event listener notification. | |
typedef VXIlogResult | SBlogContentListener (struct SBlogInterface *pThis, const VXIchar *moduleName, const VXIchar *contentType, void *userdata, VXIString **logKey, VXIString **logValue, SBlogStream **stream) |
Prototype for content listener notification All content listener registrants must conform to this signature. | |
typedef SBlogInterface | SBlogInterface |
SBlog extension interface to the VXIlog interface. | |
Functions | |
SBLOG_API VXIlogResult | SBlogInit (void) |
Global platform initialization of SBlog. | |
SBLOG_API VXIlogResult | SBlogShutDown (void) |
Global platform shutdown of Log. | |
SBLOG_API VXIlogResult | SBlogCreateResource (VXIlogInterface **log) |
Create a new log service handle. | |
SBLOG_API VXIlogResult | SBlogDestroyResource (VXIlogInterface **log) |
Destroy the interface and free internal resources. |
|
Prototype for content listener notification All content listener registrants must conform to this signature.
|
|
Prototype for diagnostic listener notification All diagnostic listener registrants must conform to this signature.
|
|
Prototype for error listener notification. All error listener registrants must conform to this signature.
|
|
Prototype for event listener notification. All event listener registrants must conform to this signature.
|
|
SBlog extension interface to the VXIlog interface. SBlog defines extensions to the VXIlog interface that support the tag mechanism and the listener registration |
|
SBlog definition of a VXIlogStream. SBlog defines a log stream as the following, which contains methods for writing data and closing the stream. |
|
Create a new log service handle.
|
|
Destroy the interface and free internal resources.
|
|
Global platform initialization of SBlog.
|
|
Global platform shutdown of Log.
|