Skip to content

t2ee/sl4js

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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');