mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-18 10:25:54 +01:00
20 lines
493 B
JavaScript
20 lines
493 B
JavaScript
|
import { shell } from 'electron'
|
||
|
import log from 'electron-log/main'
|
||
|
import { createProxy } from '@electron/helpers/index'
|
||
|
|
||
|
log.transports.console.level = false
|
||
|
|
||
|
const levels = Object.keys(log.functions)
|
||
|
|
||
|
const getFilePath = () => log.transports.file.getFile()?.path
|
||
|
|
||
|
console.log('logPath', getFilePath())
|
||
|
|
||
|
export default {
|
||
|
...createProxy(log, ['initialize', ...levels]),
|
||
|
levels,
|
||
|
functions: createProxy(log, levels),
|
||
|
getFilePath,
|
||
|
openInEditor: () => shell.openPath(getFilePath()),
|
||
|
}
|