Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ktont/bunyan-localtime

bunyan log with the local time instead of UTC
https://github.com/ktont/bunyan-localtime

Last synced: about 24 hours ago
JSON representation

bunyan log with the local time instead of UTC

Awesome Lists containing this project

README

        

# bunyan-localtime

Bunyan is a simple logging library. Too simple to log local time format.

Bunyan dependence no datetime-library at all, so it can't.

This file(this module) override Bunyan's UTC `time` fileds with local time;

## Usage

```
const bunyan = require('bunyan-localtime');

let logger = bunyan.createLogger({
name: 'log',
});
logger.info('abc123');
```

output

```
{
"name":"log",
"level":30,
"time":"2019-10-17 15:10:09.536",
"msg":"abc123",
"v":0
}
```