Have ideas to improve npm?Join in the discussion! »

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

    3.1.2 • Public • Published

    Meta Logger for Metarhia

    ci status codacy 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
    });
    
    const { console } = logger;
    console.log('Test message');
    await logger.close();

    Contributors

    License

    Copyright (c) 2017-2021 Metarhia contributors. Metalog is MIT licensed.

    Install

    npm i metalog

    DownloadsWeekly Downloads

    30

    Version

    3.1.2

    License

    MIT

    Unpacked Size

    17.2 kB

    Total Files

    7

    Homepage

    metarhia.com

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar