Package com.onenetwork.platform.tools.log
Extensions of log4j used for logging in Platform.
To acquire a logger, you should add a line similar to the following to your class:
private static PlatformLogger LOG = PlatformLogger.get(MyClass.class);Logging is done by calling a method with the appropriate priority name. For example:
LOG.info("Something interesting happened"); LOG.debug("Here are some details for debugging purposes"); try { ... } catch (Exception e) { LOG.warn("Caught exception e but handled it gracefully", e); ... }The priority of log levels within Platform is as follows:
- FATAL
- ERROR
- WARN
- INFO (this is the default log level in for a running server)
- DEBUG_SQL
- DEBUG
- DEBUG_MEDIUM
- DEBUG_DETAILED
Logger=OneNetwork Logger Service
service. Using the setDebugLevel()
method,
you can provide the name of a logger and a priority to change the logged level for that logger.
In installed Platform instances, logs are typically written to the plt_work/logs
directory by default,
and are named by date.-
Interface Summary Interface Description BizLoggerDimensions Captures standard, widely-recognized dimensions against aBizLoggerDocument
.BizLoggerDoc A BizLoggerDoc (short for "Business Logger Document") captures all the freeform text and structured data to be logged usingBizLogger
. -
Class Summary Class Description BizLogger BizLogger (short for "Business Logger") is used by modules to send textual messages and other structured data to a NoSQL data store which can be searched by a business user later.PlatformLevel Introduces three new log levels beyond the log4j defaults:PlatformLevel.DEBUG_SQL
,PlatformLevel.DEBUG_MEDIUM
andPlatformLevel.DEBUG_DETAILED
.PlatformLogger Platform logger (based on log4j) which adds convenience methods for additional log levels introduced byPlatformLevel
. -
Enum Summary Enum Description BizLogger.Level Enum for log level.