# gelfling

> Create and send GELF (Graylog2) messages, including chunking

Latest version **0.3.1** (published 2016-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install gelfling
pnpm add gelfling
yarn add gelfling
bun add gelfling
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2016-08-20 |
| First published | 2012-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Michael Hart |
| Maintainers | hichaelmart |
| Keywords | gelf, graylog, graylog2 |

## Links

- npm: https://www.npmjs.com/package/gelfling
- Repository: https://github.com/mhart/gelfling
- Homepage: https://github.com/mhart/gelfling#readme
- Issues: https://github.com/mhart/gelfling/issues
- npm.io page: https://npm.io/package/gelfling

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2016-08-20
- 0.3.0 — 2015-07-19
- 0.2.0 — 2013-01-17
- 0.1.1 — 2013-01-17
- 0.1.0 — 2013-01-17
- 0.0.6 — 2012-08-28
- 0.0.5 — 2012-08-25
- 0.0.4 — 2012-07-01
- 0.0.3 — 2012-06-19
- 0.0.2 — 2012-06-19

## 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 })
```

---
_Source: https://npm.io/package/gelfling · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
