Kad JSON Logger
Streaming logger for Kad as newline-separated
JSON.
Quick Start
Install with NPM:
npm install kad-logger-json --save
Pass your logger to Kad:
var Node = require('kad').Node;
var JSONLogger = require('kad-logger-json');
var logger = new JSONLogger();
var node = new Node({
logger: logger
});
Pipe the log output to any writable stream:
logger.pipe(process.stdout);
logger.pipe(fs.createWriteStream('logfile.txt'));
License
kad-logger-json - Streaming logger for Kad as newline-separated JSON.
Copyright (C) 2016 Gordon Hall
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see
http://www.gnu.org/licenses/.