Merge pull request #2670 from thelounge/xpaw/text-log-extension

Don't put .log in text log folder name
This commit is contained in:
Jérémie Astori 2018-07-22 02:07:32 -04:00 committed by GitHub
commit 78eae2be88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
} }