# book-file

> file transport for book logging framework

Latest version **0.0.1** (published 2012-05-10) · 0 weekly downloads

## Install

```sh
npm install book-file
pnpm add book-file
yarn add book-file
bun add book-file
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2012-05-10 |
| First published | 2012-05-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Roman Shtylman |
| Maintainers | shtylman |

## Links

- npm: https://www.npmjs.com/package/book-file
- Repository: https://github.com/shtylman/node-book-file
- npm.io page: https://npm.io/package/book-file

## Recent versions

- 0.0.1 (latest) — 2012-05-10

## README

book-file is a file transport for the [book](https://github.com/shtylman/node-book) logging framework. It will write out the json contents of the log entry.

## installation ##

```
npm install book-file
```

## use ##

book-file is used like all other book middleware. Just add it to your logger object. I recommend you create a file ```log.js``` for your project where you setup the logger however you desire across your entire project.

```javascript
// some logger you have created
var log = require('book').default();

// adds the file logging middleware to the logger
log.use(require('book-file')({
    filename: '/path/to/file.log'
});

// log stuffs, it will go to the log file
log.info('hello world!');
```

file.log will contain something along the lines of:

```
{ "level": 3, "timestamp": 12345, "message": "hello world!" }
```

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