Skip to content
⛔️ [NOT MAINTAINED] Plugin for loglevel which sends all messages to stderr on Node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.editorconfig
.gitignore
.istanbul.yml
.jshintignore
.jshintrc
.npmignore
.travis.yml
LICENSE.txt
README.md
karma.conf.js
package.json

README.md

loglevel Standard Streams plugin NPM Version Build Status Test Coverage

Plugin for loglevel which sends all messages to stderr on Node.js

Usage

Installation

Clone the sources and install the package (In the source directory) on command line using npm:

npm install

Testing

Run the following NPM script to lint, test and check coverage of the code:

npm run check

AMD

define(['loglevel', 'loglevel-std-streams'], function(log, loglevelStdStreams) {

  loglevelStdStreams(log);

  log.warn('TEST');

});

Node.js require

var log = require('loglevel');
var loglevelStdStreams = require('loglevel-std-streams');

loglevelStdStreams(log);

log.warn('TEST');

Example

$ node -e 'var log = require("loglevel-std-streams")(require("loglevel"));log.warn("This is a warning");console.log("TEST");' 2>log.txt
TEST
$ cat log.txt
This is a warning
$ 

License and copyright

Copyright (c) 2015-2017 University Of Helsinki (The National Library Of Finland)

This project's source code is licensed under the terms of MIT License.

You can’t perform that action at this time.