Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhart/gelfling
Create and send GELF (Graylog2) messages in node.js, including chunking
https://github.com/mhart/gelfling
Last synced: about 2 months ago
JSON representation
Create and send GELF (Graylog2) messages in node.js, including chunking
- Host: GitHub
- URL: https://github.com/mhart/gelfling
- Owner: mhart
- License: other
- Created: 2012-06-18T04:33:01.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T11:45:07.000Z (8 months ago)
- Last Synced: 2024-10-12T16:31:55.884Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 8
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# GELF (Graylog2) messages in node.js
Includes chunked messages, so messages can be any size
(couldn't find another node.js lib that does this)```javascript
var gelfling = require('gelfling')var client = gelfling()
client.send('Message', function(err) { console.log('Sent') })
client.send({ short_message: 'Message', facility: 'myApp', level: gelfling.INFO })
var complexClient = gelfling('localhost', 12201, {
defaults: {
facility: 'myApp',
level: gelfling.INFO,
short_message: function(msg) { var txt = msg.txt; delete msg.txt; return txt }
myAvg: function(msg) { return msg.myTotal / msg.myCount }
}
})complexClient.send({ txt: 'Hi', myTotal: 1337, myCount: 23 })
```