@youpaichris/logger 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -9,7 +9,8 @@ const fs = require('fs');
|
|
9
9
|
const path = require('path');
|
10
10
|
|
11
11
|
|
12
|
-
const logFilePath = path.join(__dirname, `${path.basename(path.dirname(__filename))}.log`);
|
12
|
+
// const logFilePath = path.join(__dirname, `${path.basename(path.dirname(__filename))}.log`);
|
13
|
+
const logFilePath = path.join(`${path.basename(path.dirname(module.parent ? module.parent.filename : __filename))}.log`);
|
13
14
|
const logFile = fs.createWriteStream(logFilePath, {flags: 'a'});
|
14
15
|
|
15
16
|
const __log = console.log;
|