refactor: replace console.log/warn/error with file-based log() for silent logging
Replace all console output with shared logger to write to /tmp/oh-my-opencode.log instead of stdout/stderr. Files changed: - index.ts: console.warn → log() - hook-message-injector/injector.ts: console.warn → log() - lsp/client.ts: console.error → log() - ast-grep/downloader.ts: console.log/error → log() - session-recovery/index.ts: console.error → log() - comment-checker/downloader.ts: console.log/error → log() CLI tools (install.ts, doctor, etc.) retain console output for UX.
This commit is contained in:
+1
-1
@@ -118,7 +118,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
||||
|
||||
if (externalNotifier.detected && !forceEnable) {
|
||||
// External notification plugin detected - skip our notification to avoid conflicts
|
||||
console.warn(getNotificationConflictWarning(externalNotifier.pluginName!));
|
||||
log(getNotificationConflictWarning(externalNotifier.pluginName!));
|
||||
log("session-notification disabled due to external notifier conflict", {
|
||||
detected: externalNotifier.pluginName,
|
||||
allPlugins: externalNotifier.allPlugins,
|
||||
|
||||
Reference in New Issue
Block a user