filebeat-logger
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

A winston logger that prints json lines in elastic common schema format

build Known Vulnerabilities npm license

Quality Gate Status Maintainability Rating Reliability Rating Security Rating

Coverage Code Smells Duplicated Lines (%)


Install

npm install --save filebeat-logger

Usage

const filebeatLogger = require('filebeat-logger')
const logger = filebeatLogger.create({
    logLevel: 'debug', // 'info' by default
    printTimestamp: false, // true by default
    keysOrder: ['@timestamp', 'message'], // ["@timestamp", "log.level", "message"] by default
    stderrLevels: ['warn', 'error'], // ["error", "warn", "warning"] by default
});

logger.info('I am an info message')
// {"@timestamp":"2022-01-30T14:49:00.323Z","message": "I am an info message","log.level":"info"}

/filebeat-logger/

    Package Sidebar

    Install

    npm i filebeat-logger

    Weekly Downloads

    119

    Version

    1.3.2

    License

    MIT

    Unpacked Size

    28.8 kB

    Total Files

    13

    Last publish

    Collaborators

    • firecow