NEXT CLASS FRAMES (opens in new window)
Class LogInstance
LogInstance
- Description:
Logger with its own context (also called status or state). New instances are created with
WL.Logger.create.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.debug('Hello world'); //[myapp] Hello world
Method Summary Method Attributes Method Name and Description debug(message)
Prints arguments to the console.
error(message)
Prints arguments to the console.
fatal(message)
Prints arguments to the console.
info(message)
Prints arguments to the console.
trace(message)
Prints arguments to the console.
warn(message)
Prints arguments to the console.
debug
debug(message)
Prints arguments to the console. Has a priority of
500 and a level ofDEBUG
.
- Parameters:
- message - One or more messages of any data type.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.debug('Hello world'); //[myapp] Hello world
error
error(message)
Prints arguments to the console. Has a priority of
100 and a level ofERROR
.
- Parameters:
- message - One or more messages of any data type.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.error('Hello world'); //[myapp] Hello world
fatal
fatal(message)
Prints arguments to the console. Has a priority of
50 and a level ofFATAL
.
- Parameters:
- message - One or more messages of any data type.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.fatal('Hello world'); //[myapp] Hello world
info
info(message)
Prints arguments to the console. Has a priority of
300 and a level ofINFO
.
- Parameters:
- message - One or more messages of any data type.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.info('Hello world'); //[myapp] Hello world
trace
trace(message)
Prints arguments to the console. Has a priority of
600 and a level ofTRACE
.
- Parameters:
- message - One or more messages of any data type.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.trace('Hello world'); //[myapp] Hello world
warn
warn(message)
Prints arguments to the console. Has a priority of
200 and a level ofWARN
.
- Parameters:
- message - One or more messages of any data type.
- Example:
var logger = WL.Logger.create({pkg: 'myapp'}); logger.warn('Hello world'); //[myapp] Hello world
© Copyright IBM Corp. 2011, 2016.