Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.55 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.55 KB

Logger

Enhanced file system handler for nodejs.

Version Downloads/week License

Simple enhanced logger for easy and beautiful logs.

Supports debug logging that can be triggered on/off from config file.

Installation

To install with yarn:

yarn add https://github.com/argus-inc/logger

To install with npm:

npm install @argus-inc/logger

Configuration

You can configure logger in two ways. One by editing the package.json and one by creating a argus.json at the same level as your package.json. (this is optional as logger comes with a default configuration)

These is what is needed for the confiiguration:

{
    "argusInc": {
        "logger": {
            "debug": true
        }
    }
}

Usage

To use logger simply do the following:

import {log, debug, debugContent, LogType} from '@argus-inc/logger';
log("Logger is initialized", LogType.Success)
debugContent({myObject: "hello"})
debug(['Here is my array', [1, 2, 3, 4, 5]])

Author

Author: Argus

Developer: Mederic Burlet

Licence: GPL-3-0-only