# node-logger-es6

> Node Server Logger

Latest version **1.2.2** (published 2017-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-logger-es6
pnpm add node-logger-es6
yarn add node-logger-es6
bun add node-logger-es6
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2017-05-04 |
| First published | 2017-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dushyant Bhalgami |
| Maintainers | dushyantbhalgami |

## Links

- npm: https://www.npmjs.com/package/node-logger-es6
- Repository: https://github.com/dushyantb/logger-es6
- Homepage: https://github.com/dushyantb/logger-es6#readme
- Issues: https://github.com/dushyantb/logger-es6/issues
- npm.io page: https://npm.io/package/node-logger-es6

## Dependencies (8)

- [moment](https://npm.io/package/moment.md) ^2.18.0
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^3.0.0
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.24.0
- [babel-core](https://npm.io/package/babel-core.md) ^6.24.1
- [archiver-promise](https://npm.io/package/archiver-promise.md) ^1.0.0
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.24.0
- [babel-preset-stage-2](https://npm.io/package/babel-preset-stage-2.md) ^6.22.0

## Recent versions

- 1.2.2 (latest) — 2017-05-04
- 1.2.1 — 2017-05-04
- 1.2.0 — 2017-04-29
- 1.1.2 — 2017-03-26
- 1.1.1 — 2017-03-26
- 1.1.0 — 2017-03-26
- 1.0.3 — 2017-03-20
- 1.0.2 — 2017-03-19
- 1.0.1 — 2017-03-19
- 1.0.0 — 2017-03-19

## README

# node-logger-es6
A simple yet powerful async logging library for node.js + ES6

## Installation
```
npm install node-logger-es6
```

## Usage
- [Configure](#configure)
- [Start Logging](#start-logging)


### Configure
- Properties
    -  level: Define the 'Level' of log, i.e. INFO/DEBUG/VERBOSE; default value `INFO`
    - rotation: Logfile rotation, i.e. d = Daily, w = Weekly; Default value `d`
    - size: Max size of 1 logfile in MB; default value `5 MB`
    -  json: Create log in JSON format; default value `true`,
     - timestamp: Include timestamp with each log line; default value `true`
```$xslt
import Logger from 'node-logger-es6'

let logger = Logger.configure(
    {
        level: 'debug',
        rotation: 'd',
        size: 5,
        json: true,
        timestamp: true
    }
);
```

### Start Logging
- logger.info("This is info message ");
- logger.debug("Log Message", "Log Details");
- logger.error("Error Message", "Error Details");

---
## TODO
- [X] Add functionality for file rotation on week basis
- [x] Add functionality for file rotation on month basis
- [ ] Add functionality for file rotation on custom duration basis
- [x] Add functionality for file size constraint
- [x] Pretty print
- [x] Archive old log files (Archive old log files when count of old log files are more than 10

## New Features Coming, Stay Tuned !!!
- [ ] Remote logging
- [ ] Move Archived Log Files to Cloud (Amazon S3/Google Drive)


---
**_Suggestions are welcomed. Send out them on dushyantbhalgami@gmail.com_**

---
_Source: https://npm.io/package/node-logger-es6 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
