<commit_before>[![version](https://badge.fury.io/js/logger-facade-nodejs.svg)](https://www.npmjs.org/package/logger-facade-nodejs)
[![Build Status](https://travis-ci.org/micro-toolkit/logger-facade-nodejs.svg?branch=master)](https://travis-ci.org/micro-toolkit/logger-facade-nodejs)
[![Code Climate](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs.png)](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs)
[![Coverage](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs/coverage.png)](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs)
[![Dependency Status](https://gemnasium.com/micro-toolkit/logger-facade-nodejs.svg)](https://gemnasium.com/micro-toolkit/logger-facade-nodejs)
![Grunt](https://cdn.gruntjs.com/builtwith.png)

Logger Facade Nodejs
====================

Simple node module to work as logger facade.

This simple logger facade allows you to hook plugins to execute async logging.

The logger facade contract:
```javascript
// register a plugin on logger
Logger.use(plugin);
// retrieve the list of plugin names
Logger.plugins();
// clean  up the list of plugins
Logger.clearPlugins();
// retrieve a logger with the specified name
var log = Logger.getLogger("Log Name");
```

The logger contract is:
```javascript
log.isDebug(); // return if in debug or trace level
log.trace("trace %s", "something");
log.debug("debug %s", "something"),
log.info("info");
log.warn();
log.error();
```

The logger uses util.format to build log message.


The plugins must follow this contract:
```javascript<commit_msg>Updates README<commit_after>[![version](https://badge.fury.io/js/logger-facade-nodejs.svg)](https://www.npmjs.org/package/logger-facade-nodejs)
[![Build Status](https://travis-ci.org/micro-toolkit/logger-facade-nodejs.svg?branch=master)](https://travis-ci.org/micro-toolkit/logger-facade-nodejs)
[![Code Climate](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs.png)](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs)
[![Coverage](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs/coverage.png)](https://codeclimate.com/github/micro-toolkit/logger-facade-nodejs)
[![Dependency Status](https://gemnasium.com/micro-toolkit/logger-facade-nodejs.svg)](https://gemnasium.com/micro-toolkit/logger-facade-nodejs)
![Grunt](https://cdn.gruntjs.com/builtwith.png)

Logger Facade Nodejs
====================

Simple node module to work as logger facade.

This simple logger facade allows you to hook plugins to execute async logging.

The logger facade contract:
```javascript
// register a plugin on logger
Logger.use(plugin);
// retrieve the list of plugin names
Logger.plugins();
// clean  up the list of plugins
Logger.clearPlugins();
// retrieve a logger with the specified name
var log = Logger.getLogger("Log Name");
```

The logger contract is:
```javascript
log.isDebug(); // return if in debug or trace level
log.trace("Message to log %s and should be hidden due to log level", 'with args');
log.trace({someinfo: true}, "Message to log %s and should be hidden due to log level", 'with args');
log.debug("Message to log %s", 'with args');
log.debug({someinfo: true}, "Message to log %s", 'with args');
log.info("Message to log %s", 'with args');
log.info({someinfo: true}, "Message to log %s", 'with args');
log.warn("Message to log %s", 'with args');
log.warn({someinfo: true}, "Message to log %s", 'with args');
log.error("Message to log %s", 'with args');
log.error({someinfo: true}, "Message to log %s", 'with args');
```

The logger uses util.format to build log message.


The plugins must follow this contract:
```javascript
{'fraction_non_alphanumeric': 0.1726775956284153, 'fraction_numerical': 0.0, 'mean_word_length': 5.378048780487805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 22, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6970917', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1156, 'n_words': 289}