Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBoxGuy committed Sep 2, 2017
1 parent 1d35d48 commit e35d158
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# TrueLogger
An advanced logger
A lightweight logger with support for custom messages and timestamps.
## How to use
First you need to create a new instance of the logger with a **moment** timestamp format.
```javascript
const logger = new TrueLogger('HH:mm:ss');
```
To send a log message use one of these methods
| Category | Tag | Tag Color |
| ------------- |:-------------:| ----------:|
| info | [I] | Grey |
| warn | [W] | Yellow |
| error | [E] | Red |
| debug | [D] | Blue |
The log methods also use the spread operator so you can do:
```javascript
logger.info('Spread','operator');
```
## Packages this project uses.
I used moment and chalk for this project. The links are below.
[Moment](https://www.npmjs.com/package/moment)
[Chalk](https://www.npmjs.com/package/chalk)

0 comments on commit e35d158

Please sign in to comment.