MCPcopy Index your code
hub / github.com/anomalyco/opencode / write

Function write

packages/desktop/src/main/logging.ts:75–88  ·  view source on GitHub ↗
(
  name: string,
  message: string,
  extra?: Record<string, unknown>,
  level: "info" | "warn" | "error" = "info",
)

Source from the content-addressed store, hash-verified

73}
74
75export function write(
76 name: string,
77 message: string,
78 extra?: Record<string, unknown>,
79 level: "info" | "warn" | "error" = "info",
80) {
81 if (!run) return
82 const scoped = log.scope(safeLogName(name))
83 if (extra !== undefined) {
84 scoped[level](message, extra)
85 return
86 }
87 scoped[level](message)
88}
89
90export function tail(): string {
91 try {

Callers 4

initCrashReporterFunction · 0.70
startNetLogFunction · 0.70
exportDebugLogsFunction · 0.70
initConsoleTransportFunction · 0.70

Calls 1

safeLogNameFunction · 0.85

Tested by

no test coverage detected