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

3.1.14 • Public • Published

Meta Logger for Metarhia

ci status snyk npm version npm downloads/month npm downloads license

Output example

Usage

const logger = await metalog.openLog({
  path: './log', // absolute or relative path
  workerId: 7, // mark for process or thread
  writeInterval: 3000, // flush log to disk interval
  writeBuffer: 64 * 1024, // buffer size (default 64kb)
  keepDays: 5, // delete after N days, 0 - disable
  home: process.cwd(), // remove substring from paths
  json: false, // print logs in JSON format, by default false
});

const { console } = logger;
console.log('Test message');
await logger.close();

License & Contributors

Copyright (c) 2017-2023 Metarhia contributors. Metalog is MIT licensed.
Metalog is a part of Metarhia technology stack.

/metalog/

    Package Sidebar

    Install

    npm i metalog

    Homepage

    metarhia.com

    Weekly Downloads

    65

    Version

    3.1.14

    License

    MIT

    Unpacked Size

    17.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • timur.shemsedinov
    • aqrln
    • lundibundi
    • belochub
    • nechaido