Skip to content

Commit

Permalink
[#302] Use single log file
Browse files Browse the repository at this point in the history
  • Loading branch information
SRichner committed Mar 18, 2024
1 parent 445d07b commit 5bc5fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/electron/electron/shared/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { LogFunctions } from 'electron-log';
import { LOG_FILE_NAME, LOG_LEVEL } from '../config/logger.config';

const getLogger = (loggerName: string, background = true): LogFunctions => {
const currentDate: string = new Date().toISOString().split('T')[0];
const processName: string = background ? LOG_FILE_NAME.BACKGROUND : LOG_FILE_NAME.RENDERER;
logger.transports.file.fileName = `${currentDate}-${processName}.log`;
logger.transports.file.fileName = `${processName}.log`;
logger.transports.file.maxSize = 15 * 1024 * 1024;
logger.transports.file.level = LOG_LEVEL.FILE;
logger.transports.console.level = LOG_LEVEL.CONSOLE;
return logger.scope(loggerName);
Expand Down

0 comments on commit 5bc5fc7

Please sign in to comment.