mathew-kurian / Scribe.js

:scroll: Node.js logging made simple! Online access to logs and more...
https://mathew-kurian.github.io/Scribe.js/
MIT License
284 stars 45 forks source link

Folder Logs already in use while implementing scribe.js webPanel #88

Closed viksat7 closed 8 years ago

viksat7 commented 8 years ago

I tried implementing web panel but getting error while starting node server as Folder Logs already in use from logWriter.js of scribe module i debugged the code from logWriter.js seems that it is being called twice which create exception while checking the folder exist or not.....

i commented that if block which check folder exist or not...and the application runs without issues

the below code i had used in my node application

var scribe = require('scribe-js')(); var console = process.console;

app.use('/logs', scribe.webPanel());

console .addLogger('fun', 'red'); console .time().fun('hello world');

viksat7 commented 8 years ago

found solution in this below link mentioned by @guillaumewuip

https://github.com/bluejamesbond/Scribe.js/issues/36

here is the solution var scribe = require('../scribe.js')({ createDefaultConsole : false });

var consoleOne = scribe.console({ logWriter : { rootPath : "testLogs" } });