Business Logger
Traditional loggers like log4j are useful for capturing process execution details. However, they're not ideal for capturing structured business data. The Business Logger overcomes this limitation. It provides a facility for capturing structured business data and allows that data to be searched/analyzed later. The information captured using the Business Logger gives insight into business process execution to end users, not just developers.
The following terms are key to understanding the Business Logger:
Business Logger A stateless API (BizLogger) for logging business information asynchronously.
Document Captures structured business data (BizLoggerDoc). This is the unit that is logged to BizLogger
Document Type A named document format. Includes a document name and version. (For example, the name might be 'PLT.ExternalReference_IB' and the version might be '1.0'.) In general, these values can be any strings, but is recommended that you come up with relevant values for the execution context. For example, in case of integration activity, ONE uses the interface name as document name and the interface version as document version. Document Types are required for creating BizLoggerDoc instances.
The following code sample shows you how to post a document to the Business Logger:
BizLoggerDoc doc = BizLogger.newDoc(
"ZBKS.BookUpdates"
,
"1.0"
);
doc.addMessage(
"Updating book ... "
);
BizLogger.info(doc,
"MyEnterprise"
, ctx);
The above code snippet captures data for business document type with name 'ZBKS.BookUpdates' and version '1.0'. The document is logged at INFO level. Please refer to the BizLogger.java javadocs for more details.