https://github.com/dial-once/node-logtify-logentries
Logentries execution chain link for node-logtify logger
https://github.com/dial-once/node-logtify-logentries
logentries logger logging logtify nodejs
Last synced: about 1 month ago
JSON representation
Logentries execution chain link for node-logtify logger
- Host: GitHub
- URL: https://github.com/dial-once/node-logtify-logentries
- Owner: dial-once
- License: mit
- Created: 2017-05-11T15:56:18.000Z (about 9 years ago)
- Default Branch: develop
- Last Pushed: 2018-11-20T07:45:09.000Z (over 7 years ago)
- Last Synced: 2025-08-21T06:57:37.337Z (10 months ago)
- Topics: logentries, logger, logging, logtify, nodejs
- Language: JavaScript
- Homepage:
- Size: 70.3 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logtify-logentries
[](https://circleci.com/gh/dial-once/node-logtify-logentries)
[](http://sonar.dialonce.net/dashboard?id=node-logtify-logentries)
[](http://sonar.dialonce.net/dashboard?id=node-logtify-logentries)
[](http://sonar.dialonce.net/dashboard?id=node-logtify-logentries)
[](http://proxy.dialonce.net/sonar/api/badges/measure?key=node-logtify-logentries&metric=coverage)
[](http://sonar.dialonce.net/dashboard?id=node-logtify-logentries)
[](http://sonar.dialonce.net/dashboard?id=node-logtify-logentries)
Logentries subscriber for [logtify](https://github.com/dial-once/node-logtify) logger
## Installation
```
npm i -S logtify-logentries
```
## Usage
Used with [logtify](https://github.com/dial-once/node-logtify) module.
```js
require('logtify-logentries')({ LOGS_TOKEN: 'YOUR_LOGENTRIES_TOKEN' });
const { stream, logger } = require('logtify')();
logger.log('error', new Error('Test error'));
logger.info('Hello world!');
```
The subscriber will make sure that a message will be sent to Logentries if:
* ``message.level >= 'MIN_LOG_LEVEL_LOGENTRIES' || 'MIN_LOG_LEVEL'``
* ``process.env.LOGENTRIES_LOGGING !== 'false' || settings.LOGENTRIES_LOGGING !== false``
**Settings**:
Module can be configured by both env variables or config object. However, env variables have a higher priority.
```js
{
LOGENTRIES_LOGGING: true|false,
LOGS_TOKEN: 'YOUR_LOGENTRIES_TOKEN',
MIN_LOG_LEVEL_LOGENTRIES: 'silly|verbose|info|warn|error',
LOG_TIMESTAMP = 'true'
LOG_ENVIRONMENT = 'true'
LOG_LEVEL = 'true'
LOG_REQID = 'true' // only included when provided with metadata
LOG_CALLER_PREFIX = 'true' // additional prefix with info about caller module/project/function
JSONIFY = 'true' // converts metadata to json
}
```