@troubkit/log
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

log

Structured Log Formatter

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 

Readme

Keywords

none

Package Sidebar

Install

npm i @troubkit/log

Weekly Downloads

52

Version

0.4.0

License

MIT

Unpacked Size

432 kB

Total Files

82

Last publish

Collaborators

  • troublor