loglevel-plugin-textfile

0.1.0 • Public • Published

loglevel-plugin-textfile

A plugin for the node logging package pimterry/loglevel that outputs messages to a log file.

Installation

Install via npm, optionally --save.

npm install loglevel-plugin-textfile

Usage

var loglevel = require('loglevel')
,	loglevelPluginTextfile = require('loglevel-plugin-textfile');

loglevelPluginTextfile(loglevel, options);

loglevel_instance.warn('This is a warning.');

Or:

var loglevel = require('loglevel')
,	loglevel_instance = loglevel.getLogger('some_instance')
,	loglevelPluginTextfile = require('loglevel-plugin-textfile');

loglevelPluginTextfile(loglevel_instance, options);

loglevel_instance.warn('This is a warning.');

Options

The options object may have the following fields:

{
	filename: '/path/to/file/[DATE]_[TIME]_mylog.log',
	passthrough: true, 
	prefix: 'MyPrefix',
	flavor: 0
}

Changelog

Version 0.1.0

Initial commit.

Readme

Keywords

none

Package Sidebar

Install

npm i loglevel-plugin-textfile

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

8.2 kB

Total Files

5

Last publish

Collaborators

  • klovadis