mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
fad49bb070
AudioMedia entity for loading & controlling a single audio media AudioMediaManagerService: Global audio state synchronization across tabs AudioAttachmentService + AudioAttachmentBlock for manipulating AttachmentBlock in affine - e.g., filling transcription (using mock endpoint for now) Added AudioBlock + AudioPlayer for rendering audio block in affine (new transcription block whose renderer is provided in affine) fix AF-2292 fix AF-2337
24 lines
512 B
TypeScript
24 lines
512 B
TypeScript
import { app, shell } from 'electron';
|
|
import log from 'electron-log/main';
|
|
|
|
export const logger = log.scope('main');
|
|
log.initialize({
|
|
preload: false,
|
|
});
|
|
|
|
log.transports.file.level = 'info';
|
|
log.transports.console.level = 'info';
|
|
|
|
export function getLogFilePath() {
|
|
return log.transports.file.getFile().path;
|
|
}
|
|
|
|
export async function revealLogFile() {
|
|
const filePath = getLogFilePath();
|
|
return await shell.openPath(filePath);
|
|
}
|
|
|
|
app.on('before-quit', () => {
|
|
log.transports.console.level = false;
|
|
});
|