nangning-logger-color

1.2.1 • Public • Published

logger-color

Logger color is module log for print in terminal which is presented with an interactive display.

Installation

npm install nangning-logger-color

Usage

const log = require("nangning-logger-color");

// Sample Log Info
log.info({ 
    ip: ctx.request.ip(),
    endpoint: ctx.request.url(),
    params: ctx.request.body,
    method: ctx._request_.request.method,
    responseTime: diff + ' second',
    results: ctx.response.lazyBody.content
});

// Sample Log Error
log.error({ 
    ip: ctx.request.ip(),
    endpoint: ctx.request.url(),
    params: ctx.request.body,
    method: ctx._request_.request.method,
    responseTime: diff + ' second',
    results: err
});

For the full reference check the Winston GitHub repository.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i nangning-logger-color

    Weekly Downloads

    0

    Version

    1.2.1

    License

    ISC

    Unpacked Size

    2.97 kB

    Total Files

    3

    Last publish

    Collaborators

    • anangnovriadi