Log Management System
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 0.6 or higher is required.
Installation is done using the
npm install
command:
$ npm i wfl
A log management system, which can help manage logs more easily.
Here is an example on how to use it:
let Log = require('wfl');
Log.error('Username Invalid');
Add this json object to the root object of the package.json file
{
"wfl": {
"size": "15m",
"where": {
"error": "18m"
},
"path": "./Logger",
"offset": "2h",
"accessToDelete": true
}
}
{
"name": "simple-test",
"version": "1.0.0",
"description": "This is a simple app",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"wfl": {
"size": "15m",
"where": {
"error": "18m"
},
"path": "./Logger",
"offset": "2h",
"accessToDelete": true
}
}
Path
=> File storage location
Size
=> Maximum size of each file
Where
=> Delete old files from some folders
Offset
=> Maximum time for delete old file
AccessToDelete
=> update Disables deleting old files from disk