Skip to content

Commit 7b0859d

Browse files
committed
feat: don't record debug log to local log file.
1 parent a6b185d commit 7b0859d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/core/logger.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ ConsoleStream.prototype._write = function (data, enc, callback) {
5959
} else {
6060
process.stdout.write(msg);
6161
}
62-
63-
const logDir = pathFn.join(osenv.home(), './.feflow/logs');
64-
const today = formatDate('yyyy-MM-dd', new Date());
65-
const logPath = pathFn.join(logDir, `${today}.log`);
66-
fs.appendFileSync(logPath, msg);
62+
63+
if (!this.debug) {
64+
const logDir = pathFn.join(osenv.home(), './.feflow/logs');
65+
const today = formatDate('yyyy-MM-dd', new Date());
66+
const logPath = pathFn.join(logDir, `${today}.log`);
67+
fs.appendFileSync(logPath, msg);
68+
}
6769

6870
callback();
6971
};

0 commit comments

Comments
 (0)