Now, that our logger has been created, we are able to log our first messages:
logger.trace("hello from 'trace' level") logger.debug("hello from 'debug' level") logger.info("hello from 'info' level") logger.warn("hello from 'warn' level") logger.error("hello from 'error' level")
To change the logging level use the property level:
logger.setLevel(nope.WARN);
logger.trace("hello from 'trace' level") logger.debug("hello from 'debug' level") logger.info("hello from 'info' level") logger.warn("hello from 'warn' level") logger.error("hello from 'error' level")
Author
Martin Karkowski
Email
m.karkowski@zema.de
This module contains the basics of for logging content.
For a logger please use the following methods.
centralLogger
To change the logging behavior use the one of the following funtions:
You can convert the logger to an eventEmitter using the function getLogerAsEventEmitter
In the backend (
nodejs
) you can use the useLogFile method to log the content to a file.Using a Logger:
Now, that our logger has been created, we are able to log our first messages:
To change the logging level use the property level:
As you can see you are able to change the log level.