💄 node-log-rotate 💄
Description
inspire:
megahertz/electron-log: Just a very simple logging module for your Electron application
Just a very simple logging module for your node.js application. No dependencies. No complicated configuration. Just require and use.
By default it writes logs to the following locations:
- on Linux:
~/.config/<app name>/<date+time>log.log
- on OS X:
~/Library/Logs/<app name>/<date+time>log.log
- on Windows:
$HOME/AppData/Roaming/<app name>/<date+time>log.log
Installation
Install with npm:
npm install node-log-rotate
or
Yarn
yarn add node-log-rotate
Usage
Basic usage
Name of the directory get from process.env.npm_package_name
.
; ;
ES2015
;; ;
CommonJS
var log = ;log; log;
About deleting log files
For this sample, log files before 10 days ago will be deleted.
;; ;