mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Clear loghandlers on init and supress output in tests
This commit is contained in:
parent
c8d2d690f0
commit
1712146836
@ -19,6 +19,7 @@ var EventEmitter = require("events").EventEmitter;
|
||||
|
||||
|
||||
var levels = {
|
||||
off: 0,
|
||||
fatal: 10,
|
||||
error: 20,
|
||||
warn: 30,
|
||||
@ -72,6 +73,7 @@ var log = module.exports = {
|
||||
METRIC: 99,
|
||||
|
||||
init: function(settings) {
|
||||
logHandlers = [];
|
||||
var consoleSettings = {};
|
||||
if (settings.logging) {
|
||||
consoleSettings = settings.logging.console || {};
|
||||
|
@ -123,7 +123,9 @@ module.exports = {
|
||||
|
||||
startServer: function(done) {
|
||||
server = http.createServer(function(req,res){app(req,res);});
|
||||
RED.init(server, {});
|
||||
RED.init(server, {
|
||||
logging:{console:{level:'off'}}
|
||||
});
|
||||
server.listen(listenPort, address);
|
||||
server.on('listening', function() {
|
||||
port = server.address().port;
|
||||
|
Loading…
Reference in New Issue
Block a user