Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nisaacson/loggly-console-logger
Winston-based logger that outputs to the console and loggly if the loggly input token is set in the nconf object
https://github.com/nisaacson/loggly-console-logger
Last synced: about 1 month ago
JSON representation
Winston-based logger that outputs to the console and loggly if the loggly input token is set in the nconf object
- Host: GitHub
- URL: https://github.com/nisaacson/loggly-console-logger
- Owner: nisaacson
- Created: 2013-03-21T00:23:12.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-03T23:02:14.000Z (over 11 years ago)
- Last Synced: 2024-10-09T19:10:08.896Z (about 1 month ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Loggly Console Logger
[![Dependency Status](https://david-dm.org/nisaacson/loggly-console-logger.png)](https://david-dm.org/nisaacson/loggly-console-logger)
Winston-based logger that outputs to the console and loggly if the loggly input token is set in the nconf object
# Installation
```bash
npm install -S loggly-console-logger
```# Usage
To use send your logs to loggly, you must first specify your `inputToken` and `subdomain` in the nconf object. Only logs with the level `info` and higher will be sent to loggly. Any `debug` level logging statements are only logged to the console
```javascript
var nconf = require('nconf').argv().env().defaults({
loggly: {
inputToken: 'foo-loggly-input-token-here',
subdomain: 'foo'
}
})var logger = require('logger')
logger.debug('this will be logged to the console only')
logger.info('this will be logged to the console and submitted to loggly as well')
```