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

https://github.com/oschweitzer/woodcutter

A small logger based on winston and developed in TypeScript
https://github.com/oschweitzer/woodcutter

logging nodejs npm typescript winston

Last synced: about 1 year ago
JSON representation

A small logger based on winston and developed in TypeScript

Awesome Lists containing this project

README

          

# WoodCutter

WoodCutter is a small logger based on winston and developed in TypeScript.

## Install

```bash
npm install --save woodcutter
```

## Run tests

```bash
npm run test
```

## Usage

```typescript
import {LogLevel} from '../lib/log-level.enum';
import {WoodCutter} from '../lib/woodcutter';

function main() {
const woodcutter = new WoodCutter({
level: LogLevel.SILLY
});
woodcutter.debug("Hey debug", 5, "test", {"hello": "world"});
woodcutter.info("Hey info");
woodcutter.error("Hey error");
woodcutter.verbose("Hey verbose");
woodcutter.warn("Hey warn");
woodcutter.silly("Hey silly");
woodcutter.log('verbose', "Hey log info");
}

main();
```

Console output:

![woodcutter logs screenshot](assets/woodcutter_logs.png)