diff --git a/src/Component/commandManager.ts b/src/Component/commandManager.ts index 58e1f5862..c32f72231 100644 --- a/src/Component/commandManager.ts +++ b/src/Component/commandManager.ts @@ -63,14 +63,14 @@ export class CommandManager extends LogEmitter<{}> { private constructor(){ super("CommandsManager"); - this.logger.info("Initializing"); + this.logger.trace("Initializing"); this._commands = (require("../Commands/_index") as typeof import("../Commands/_index")).default.filter(n => !n.disabled); this.initializeMap({ reportDupes: getConfig().debug }); this.initializeSubcommandNames(); - this.logger.info("Initialized"); + this.logger.trace("Initialized"); } private initializeMap({ reportDupes }: { reportDupes: boolean }){ diff --git a/src/Component/telemetry.ts b/src/Component/telemetry.ts index fd4709077..ad0c200ff 100644 --- a/src/Component/telemetry.ts +++ b/src/Component/telemetry.ts @@ -43,7 +43,7 @@ export class Telemetry extends LogEmitter> { this.logger.info("Discord-SimpleMusicBot now collects completely anonymous telemetry data about usage."); this.logger.info("This is completely optional and you can opt-out it."); - this.logger.info("See https://sr.usamyon.moe/dsmb-telemetry for more info."); + this.logger.info("See https://sr.usamyon.moe/dsmb-telemetry for details."); this.bot.once("ready", this.onReady.bind(this)); } @@ -100,7 +100,7 @@ export class Telemetry extends LogEmitter> { .digest() .toString("hex"); - this.logger.debug(`Telemetry hash is "${hash}"`); + this.logger.debug(`(SECRET) Telemetry hash is "${hash}"`); return hash; } diff --git a/src/events/ready.ts b/src/events/ready.ts index c33a19fd6..fba4f2b65 100644 --- a/src/events/ready.ts +++ b/src/events/ready.ts @@ -36,7 +36,7 @@ export async function onReady(this: MusicBot){ this["_mentionText"] = `<@${client.user.id}>`; - this.logger.info("Starting environment checking and preparation now"); + this.logger.info("Starting environment checking and preparation."); // Set activity as booting if(!this.maintenance){ diff --git a/src/index.ts b/src/index.ts index 85be752c6..d3a61c3e2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,9 +33,9 @@ const logger = log4js.getLogger("Entry"); const config = getConfig(); logger.info("Discord-SimpleMusicBot by mtripg6666tdr"); -logger.info("This application was originally built by mtripg6666tdr and is licensed under GPLv3 or later."); +logger.info("This application was originally written by mtripg6666tdr and is licensed under GPLv3 or later."); logger.info("There is no warranty for the work, both of the original and its forks."); -logger.info("However if you found any bugs in the original please feel free to report them by creating an issue on GitHub."); +logger.info("However if you find a bug in the original application, please feel free to report it by creating an issue on GitHub."); logger.info("Thank you for using Discord-SimpleMusicBot!"); logger.info(`Node.js v${process.versions.node}`); diff --git a/src/logger.ts b/src/logger.ts index 9b1649416..c064c778b 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -71,10 +71,15 @@ const memoryAppender = { const logContent = `${level}:[${ tokens.category(logEvent) }] ${logEvent.data.map(data => typeof data === "string" ? data : stringifyObject(data))}`; - memoryStore.push(logContent); + + if(!logContent.includes("(SECRET)")){ + memoryStore.push(logContent); + } + if(memoryStore.length > MEMORYSTORE_MAXSIZE){ memoryStore.shift(); } + if(process.env.CONSOLE_ENABLE){ console[level === "F" || level === "E" ? "error" : level === "W" ? "warn" : "log"](logContent); }