From 3422550f2c9bf81d15686aca854325ae5e711029 Mon Sep 17 00:00:00 2001 From: Guillaume Wuip Date: Sat, 24 Jan 2015 09:09:52 +0100 Subject: [PATCH 1/3] Allow one log folder for multiple consoles --- lib/logWriter.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/logWriter.js b/lib/logWriter.js index dcea714..ae90d4c 100644 --- a/lib/logWriter.js +++ b/lib/logWriter.js @@ -31,13 +31,6 @@ this.rootPath = rootPath || 'logs'; - //Check if the folder is already in use - if (rootPaths.indexOf(this.rootPath) > -1) { - throw new Error('Folder ' + this.rootPath + ' already in use'); - } else { - rootPaths.push(this.rootPath); - } - //Init history this.initHistory(); }; From 53cbfaac5e8e7adfc9de8c51d7cad10f3b220cb8 Mon Sep 17 00:00:00 2001 From: Guillaume Wuip Date: Sat, 24 Jan 2015 09:23:29 +0100 Subject: [PATCH 2/3] Example one folder - two consoles --- examples/multiplesConsolesOneFolder.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/multiplesConsolesOneFolder.js diff --git a/examples/multiplesConsolesOneFolder.js b/examples/multiplesConsolesOneFolder.js new file mode 100644 index 0000000..807142d --- /dev/null +++ b/examples/multiplesConsolesOneFolder.js @@ -0,0 +1,18 @@ +var scribe = require('../scribe.js')({ + createDefaultConsole : false +}); + +var consoleOne = scribe.console({ + logWriter : { + rootPath : "testLogs" + } +}); +var consoleTwo = scribe.console({ + logWriter : { + rootPath : "testLogs" + } +}); + +//both will log in /testLogs +consoleOne.log("Hello one"); +consoleOne.log("Hello two"); From 9ff53618886daa9b984b1bc72c3a43776e7f6ea0 Mon Sep 17 00:00:00 2001 From: Guillaume Wuip Date: Sat, 24 Jan 2015 09:24:34 +0100 Subject: [PATCH 3/3] Remove whitespace --- examples/multiplesConsolesOneFolder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/multiplesConsolesOneFolder.js b/examples/multiplesConsolesOneFolder.js index 807142d..cd5c4f2 100644 --- a/examples/multiplesConsolesOneFolder.js +++ b/examples/multiplesConsolesOneFolder.js @@ -13,6 +13,6 @@ var consoleTwo = scribe.console({ } }); -//both will log in /testLogs +//both will log in /testLogs consoleOne.log("Hello one"); consoleOne.log("Hello two");