# node-book-file **Repository Path**: mirrors_defunctzombie/node-book-file ## Basic Information - **Project Name**: node-book-file - **Description**: file transport for book logging framework - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## 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!" } ```