MCPcopy
hub / github.com/anomalyco/opencode / initLogging

Function initLogging

packages/desktop/src/main/logging.ts:22–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20export const getLogger = () => logger
21
22export function initLogging() {
23 initRunDirectory()
24 log.transports.file.maxSize = 5 * 1024 * 1024
25 log.transports.file.resolvePathFn = (_vars, message) =>
26 join(
27 run,
28 `${safeLogName(message?.scope ?? (message?.variables?.processType === "renderer" ? "renderer" : "main"))}.log`,
29 )
30 log.initialize({ preload: false, spyRendererConsole: true })
31 initConsoleTransport()
32 cleanup()
33 return (logger = log)
34}
35
36export function initCrashReporter() {
37 const dir = join(app.getPath("userData"), "Crashpad")

Callers 1

index.tsFile · 0.90

Calls 6

initRunDirectoryFunction · 0.85
joinFunction · 0.85
safeLogNameFunction · 0.85
initConsoleTransportFunction · 0.85
initializeMethod · 0.80
cleanupFunction · 0.70

Tested by

no test coverage detected