Don't put .log in text log folder name

This commit is contained in:
Pavel Djundik 2018-07-22 00:39:22 +03:00
parent 5b2de64af8
commit 265876786c

View File

@ -97,7 +97,7 @@ class TextFileMessageStorage {
line += "\n"; line += "\n";
fs.appendFile(path.join(logPath, cleanFilename(channel.name)), line, (e) => { fs.appendFile(path.join(logPath, `${cleanFilename(channel.name)}.log`), line, (e) => {
if (e) { if (e) {
log.error("Failed to write user log", e); log.error("Failed to write user log", e);
} }
@ -122,5 +122,5 @@ function cleanFilename(name) {
name = filenamify(name, {replacement: "_"}); name = filenamify(name, {replacement: "_"});
name = name.toLowerCase(); name = name.toLowerCase();
return `${name}.log`; return name;
} }