Skip to content

Pom4H/metalog

 
 

Repository files navigation

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();

License & Contributors

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

About

Metarhia logger 📝

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%