Skip to content

Commit

Permalink
fix: logs not outputting to the correct directory
Browse files Browse the repository at this point in the history
  • Loading branch information
espimarisa committed Aug 26, 2024
1 parent 6168269 commit b10f7e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/classes/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class HibikiClient extends Client {
await loadCommands(this, COMMANDS_DIRECTORY);
await loadEvents(this, EVENTS_DIRECTORY);

logger.info("Logged in to Discord");
logger.info(`Logged in to Discord as ${this.user?.tag}`);
logger.info(`${this.commands.size.toString()} commands loaded`);
logger.info(`${this.events.size.toString()} events loaded`);

Expand Down
7 changes: 1 addition & 6 deletions src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { PrettyOptions } from "pino-pretty";
const pathDirname = path.dirname(Bun.fileURLToPath(import.meta.url));

// Directories to crawl
const LOGS_DIRECTORY = path.join(pathDirname, "../../../logs");
const LOGS_DIRECTORY = path.join(pathDirname, "../../logs");

// Pino-pretty options
const pinoPrettyOptions = {
Expand All @@ -22,11 +22,6 @@ const pinoRotateFileOptions = {
dir: LOGS_DIRECTORY,
mkdir: true,
maxAgeDays: 14,
prettyOptions: {
...pinoPrettyOptions,
// Disable colorization for fs log files
colorize: false,
},
} satisfies PinoRotateFileOptions;

export const logger = createLogger(
Expand Down

0 comments on commit b10f7e4

Please sign in to comment.