Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

treegex/wfl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WFL

Log Management System

Table of Contents

Install

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

Introduction

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

Configuration

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
  }
}

Example

{
  "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