Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Mar 10, 2018
1 parent 1f50d41 commit cabb131
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/nightingale-level-names/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# nightingale-level-names

```js
import levels from 'nightingale-levels';
import levelNames from 'nightingale-level-names';

console.log(levelNames.get(levels.TRACE));
console.log(levelNames.get(levels.DEBUG));
console.log(levelNames.get(levels.INFO));
console.log(levelNames.get(levels.WARN));
console.log(levelNames.get(levels.ERROR));
console.log(levelNames.get(levels.CRITICAL));
console.log(levelNames.get(levels.FATAL));
console.log(levelNames.get(levels.ALERT));
console.log(levelNames.get(levels.EMERGENCY));
```
10 changes: 10 additions & 0 deletions packages/nightingale-level-names/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = new Map([
[10, 'trace'],
[100, 'debug'],
[200, 'info'],
[300, 'warn'],
[400, 'error'],
[500, 'critical'],
[550, 'fatal'],
[600, 'emergency'],
]);
13 changes: 13 additions & 0 deletions packages/nightingale-level-names/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "nightingale-level-names",
"description": "Nightingale level values to level names",
"keywords": [
"logger"
],
"version": "1.0.0",
"homepage": "https://github.com/nightingalejs/nightingale",
"license": "ISC",
"author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
"repository": "nightingalejs/nightingale-level-names",
"main": "./index.js"
}

0 comments on commit cabb131

Please sign in to comment.