Monday, July 11, 2016

How different log levels work and effected product- WSO2 API Manager

In our logs we are logging message in following order.
TRACE - Designates finer-grained informational events than the DEBUG.
DEBUG - Designates fine-grained informational events that are most useful to debug an application.
INFO - Designates informational messages that highlight the progress of the application at coarse-grained level.
WARN - Designates potentially harmful situations.
ERROR - Designates error events that might still allow the application to continue running.
FATAL - Designates very severe error events that will presumably lead the application to abort.

Threshold defined there to filter log entries based on their level. For example, threshold set to "WARN" will allow log entry to pass into appender if its level is "WARN," "ERROR" or "FATAL," other entries will be discarded.

But if you have custom class then you need only log debug logs following code block will work.

private static org.apache.log4j.Logger log = Logger .getLogger(LogClass.class);

No comments:

Post a Comment