(file = path.join(Global.Path.log, "opencode.log"), id: string = runID)
| 47 | } |
| 48 | |
| 49 | export function fileLogger(file = path.join(Global.Path.log, "opencode.log"), id: string = runID) { |
| 50 | // Do not set batchWindow to 0; it causes high idle CPU usage. |
| 51 | return Logger.toFile(formatter(id), file, { flag: "a" }) |
| 52 | } |
| 53 | |
| 54 | const stderrLogger = Logger.make((options) => process.stderr.write(formatter().log(options) + "\n")) |
| 55 |