Files
AFFiNE-Mirror/apps/electron/src/main/logger.ts
2023-06-13 10:01:43 +08:00

15 lines
330 B
TypeScript

import { shell } from 'electron';
import log from 'electron-log';
export const logger = log.scope('main');
log.initialize();
export function getLogFilePath() {
return log.transports.file.getFile().path;
}
export async function revealLogFile() {
const filePath = getLogFilePath();
return await shell.openPath(filePath);
}