https://github.com/faust64/logger
NodeJS logging library
https://github.com/faust64/logger
Last synced: 2 months ago
JSON representation
NodeJS logging library
- Host: GitHub
- URL: https://github.com/faust64/logger
- Owner: faust64
- License: bsd-3-clause
- Created: 2018-01-07T08:05:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T10:17:01.000Z (12 months ago)
- Last Synced: 2025-03-14T14:39:09.394Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 155 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Logger library - npmjs' wraplog
* Last tests against master on CircleCI: [](https://circleci.com/gh/faust64/logger)
* Install with:
```
sudo npm install -g node-gyp
npm install wraplog
```Note `node-gyp` would be required installing `unix-dgram` dependency.
* Configure using:
```
# divert everything to console:
export DEBUG=whateverstringwoulddo# to local syslog
export SYSLOG_FACILITY=local6
export SYSLOG_PROTO=unix
export SYSLOG_UNIX_SOCKET=/dev/log# to remote syslog
export SYSLOG_FACILITY=local6
export SYSLOG_PROTO=udp
export SYSLOG_PROXY=rsyslog.example.com
export SYSLOG_PORT=514
```* Use it in place of `console.*`:
```
const logger = require('wraplog')('appname');
logger.info('foo');
logger.error('bar');
```