Plugin for loglevel which sends all messages to stderr on Node.js
Clone the sources and install the package (In the source directory) on command line using npm
:
npm install
Run the following NPM script to lint, test and check coverage of the code:
npm run check
define(['loglevel', 'loglevel-std-streams'], function(log, loglevelStdStreams) {
loglevelStdStreams(log);
log.warn('TEST');
});
var log = require('loglevel');
var loglevelStdStreams = require('loglevel-std-streams');
loglevelStdStreams(log);
log.warn('TEST');
$ 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
$
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.