# bunyan-serializers

> A few customized serializers for the bunyan logging framework

Latest version **0.0.2** (published 2014-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install bunyan-serializers
pnpm add bunyan-serializers
yarn add bunyan-serializers
bun add bunyan-serializers
```

## 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.0.2 |
| Published | 2014-01-27 |
| First published | 2012-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Admazely |
| Maintainers | kesla |
| Keywords | logger, bunyan |

## Links

- npm: https://www.npmjs.com/package/bunyan-serializers
- Repository: https://github.com/Admazely/bunyan-serializers
- Issues: https://github.com/Admazely/bunyan-serializers/issues
- npm.io page: https://npm.io/package/bunyan-serializers

## Recent versions

- 0.0.2 (latest) — 2014-01-27
- 0.0.1 — 2012-12-18

## README

# bunyan-serializers

Some customized serializers for bunyan.

## example

```javascript
    var serializers = require('bunyan-serializers');
    var bunyan = require('bunyan');

    var logger = bunyan.createLogger({
        serializers: serializers,
        stream: process.stdout,
        name: 'test'
    });

    var server = http.createServer(function(req, res) {
        logger.info({req: req, res: res}, 'Got a request and a response');
    });
    server.listen(8080);
```

## differences from bunyan.stdSerializers.

In the standard serializer for bunyan the req- and res-objects are serialized when creating a child-logger, like

```javascript
    var child = bunyan.child({
        req: reqObj,
        res: resObj
    });
```
This means that that if the reqObj or resObj get changed after the child has been initated those changes will not be logged properly.
The serializers for req and res-objects are in this project not serialized when a child is created but rather when you actually log.

A serializer for an err-object is also attached for completeness.

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