# @troubkit/log

> A collection of logging utilities based on winston logger

Latest version **0.4.0** (published 2021-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @troubkit/log
pnpm add @troubkit/log
yarn add @troubkit/log
bun add @troubkit/log
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2021-12-22 |
| First published | 2021-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 421.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Troublor |
| Maintainers | troublor |

## Links

- npm: https://www.npmjs.com/package/@troubkit/log
- npm.io page: https://npm.io/package/@troubkit/log

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [logform](https://npm.io/package/logform.md) ^2.3.0
- [winston](https://npm.io/package/winston.md) ^3.3.3
- [triple-beam](https://npm.io/package/triple-beam.md) ^1.3.0

## Recent versions

- 0.4.0 (latest) — 2021-12-22
- 0.3.0 — 2021-04-10
- 0.3.0-alpha.0 — 2021-02-18
- 0.2.0-alpha.0 — 2021-01-12
- 0.1.5-alpha.0 — 2021-01-10
- 0.1.4-alpha.0 — 2021-01-02
- 0.1.3-alpha.0 — 2021-01-02
- 0.1.2-alpha.0 — 2021-01-02
- 0.1.1-alpha.0 — 2021-01-02

## README

# log

## Structured Log Formatter

```typescript
import {structured} from "@troubkit/log";
import * as winston from "winston";
import {format} from "logform";

const logger = winston.createLogger({
    format: winston.format.combine([
        winston.format.label("test"),
        structured({colorize: true}),
    ]),
});
logger.info("test message", {key: "value"});
// [INFO][12-22|17:36:31.767][test] test message                                     key=value 
```

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