Node.js logger with customizable appenders and rich output layout patterns
Branch: master
Clone or download
Latest commit c12f58d Aug 7, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config publish Jul 27, 2017
docs [ci skip] npm badge Aug 7, 2017
src add default configuration to allow use free of confugration Aug 6, 2017
.editorconfig obey tslint rules. Mar 18, 2017
.gitignore added travis Aug 1, 2017
.npmignore
.travis.yml fix travis config Aug 2, 2017
LICENSE.md update doc Aug 1, 2017
README.md [ci skip] npm badge Aug 7, 2017
build.js obey tslint rules. Mar 18, 2017
logger.yml update https Aug 4, 2017
package.json add default configuration to allow use free of confugration Aug 6, 2017

README.md

Introducation

A simple logging library yet with powerful functionalities. Customizable appenders and rich output format. Share configurations through application.

For detailed introduction and examples, please visit sl4js.t2ee.org

Installation

npm i reflect-metadata @t2ee/core @t2ee/sl4js -S

Example

  default: ConsoleDebug
  level: LogLevel.DEBUG
  appenders:
  - name: ConsoleDebug
    appender: console
      pattern: '%d{YYYY-MM-DD HH:mm:ss.SSS} %-7c{[%l]} %10n %5p - %2w  %M'
      level: LogLevel.DEBUG
  - name: FileLog
    appender: file
    pattern: '%d{YYYY-MM-DD HH:mm:ss.SSS} [%l] %10n %5p - %2w  %M'
    level: LogLevel.INFO
    file: relative(file.log)
ConfigurationStore.loadFile(PATH_TO_LOGGING_CONFIGURATION);
LogManager.getLogger().debug('Hello World');