0.2.0 • Published 4 years ago

@brandednomad/eventlogger v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

@brandednomad/eventlogger

A simple event logger for node servers. NOTE: This package is still under development

Installation

Requires npm 2.7.0 or higher

npm init

npm install @brandednomad/eventlogger --save


Usage

const Logger = require("@brandednomad/eventlogger");

const config={ logFilePath:"./folderName/fileName" }

const log = new Logger(config);

const LogParams { message: string; ip: string; user: string; url: string; info: string; }

log.info(LogParams)


Methods

object.info()

Logs info events to file

It takes a LogParams object as parameters that specifies the information to be logged.

object.info()

Logs info events to file

It takes a LogParams object as parameters that specifies the information to be logged.

object.warn()

Logs warning events to file

It takes a LogParams object as parameters that specifies the information to be logged.

object.error()

Logs error events to file

It takes a LogParams object as parameters that specifies the information to be logged.


Testing

To test, go to the root folder and type

npm test


Repo(s)


contributing

Contributions not accepted at this moment

Version History

Version 0.1.0

  • initial release