Skip to content

Simple logging facade for NodeJS allowing the end user to choose the desired logging framework at deployment time.

Notifications You must be signed in to change notification settings

fabianishere/slf4n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Build Status

Configuration

You can specify the binding by either:

  • Export SLF4N_BINDING with the name of the binding.
  • Adding a slf4n field 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 slf4n

License

This project is licensed under MIT. More information can be found in LICENSE.

About

Simple logging facade for NodeJS allowing the end user to choose the desired logging framework at deployment time.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published