JSLogger
Last updated
Last updated
This logger provides an API for logging with arguments, e.g. log.info.log("my message and my {}", "argument");. This class can also be used to obtain JSLogBuilder instances. Available logging levels are (in order): fatal, error, warn, info, debug and trace.
Type | Name | Summary |
---|---|---|
Construct a log event that will always be logged.
Type JSLogBuilder a LogBuilder
Sample
Construct a debug log event.
Type JSLogBuilder a LogBuilder
Sample
Check if the current logger's logging level enables logging on the debug level. Return true if the logger's level is set to debug or trace.
Type Boolean true if 'debug' level is enabled for logging
Construct an error log event.
Type JSLogBuilder a LogBuilder
Sample
Check if the current logger's logging level enables logging on the error level. Return true if the logger's level is set to error, warn, info, debug or trace.
Type Boolean true if 'error' level is enabled for logging
Construct a fatal log event.
Type JSLogBuilder a LogBuilder
Sample
Check if the current logger's logging level enables logging on the fatal level. Return true if the logger's level is set to fatal, error, warn, info, debug or trace.
Type Boolean true if 'fatal' level is enabled for logging
Construct an info log event.
Type JSLogBuilder a LogBuilder
Sample
Check if the current logger's logging level enables logging on the info level. Return true if the logger's level is set to info, debug or trace.
Type Boolean true if 'info' level is enabled for logging
Get the logging level of this logger
Type String the logging level of this logger
Construct a trace log event.
Type JSLogBuilder a LogBuilder
Sample
Check if the current logger's logging level enables logging on the trace level. Return true if the logger's level is set to trace.
Type Boolean true if 'trace' level is enabled for logging
Construct a warn log event.
Type JSLogBuilder a LogBuilder
Sample
Check if the current logger's logging level enables logging on the warn level. Return true if the logger's level is set to warn, info, debug or trace.
Type Boolean true if 'warn' level is enabled for logging
Set the level for this logger. Be aware that this will override the logging level as configured in log4j.xml, meaning it affects all JSLogger instances based on that configuration. This changes the global configuration, meaning that restarting the client will not reset the logging level to it's default state. Only restarting the application server will reset the logging level to it's default state.
Parameters
JSLogBuilder level the desired logging level for this logger
Returns: void
Sample
Type | Name | Summary |
---|---|---|