1.1.5 • Published 3 years ago

ang-logger v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

ANG Logger

This module aims to manage logs of all ANG projects. It will be a part of ANG node modules

Before Loading project

Make sure you declare the required env variable in your project. These variables will be used this module

List of vars :

GRAYLOG_URI GRAYLOG_PORT SLACK_WEBHOOK_URL SLACK_CHANNEL DISABLE_LOG *False by default

Using the module

To use this module, simply call it with :

import log from 'ang-logger';

And call the level you need function with JSON parameter of what you need to log.

4 levels in ANG projects:

log.info Will call the standard output process.stdout.write log.error Will call the error output process.stderr.write log.warn Will send data to graylog, it is used when there is http errors log.fatal Will send data to slack, it is used only when a fatal error happens: '503 '

LevelOutput
infoprocess.stdout.write
errorprocess.stderr.write
warnGraylog
fatalSlack

Switching logs:

If an error occurs when trying to send data to graylog, the logger will automatically swith all the warn error to Slack. And viceversa, if an error occurs in Slack, we send data to graylog. This will ensure that the actual log will be sent.

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago