0.1.0 • Published 9 years ago
slf4n-api v0.1.0
SLF4N
SLF4N is a simple logging facade for NodeJS allowing the end user to choose the desired logging framework at deployment time. Thanks for visiting!
Using SLF4N is really simple as shown below:
import slf4n from 'slf4n';
const logger = slf4n.get(module);
logger.info("Hello World!");In case you are not using ES6 modules yet:
var logger = require('slf4n').default.get(module);
logger.info("Hello World!");Build Status
Configuration
You can specify the binding by either:
- Export
SLF4N_BINDINGwith the name of the binding. - Adding a
slf4nfield to your package.json with the name of the binding.
Methods
.trace(message, arguments).debug(message, arguments).info(message, arguments).warn(message, arguments).error(message, arguments).isTraceEnabled().isDebugEnabled().isInfoEnabled().isWarnEnabled().isErrorEnabled()
Installation
To install SLF4N, just run the following command in the terminal:
$ npm install --save slf4nLicense
This project is licensed under MIT. More information can be found in LICENSE.
0.1.0
9 years ago