mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix log
This commit is contained in:
parent
8b26a1f9bd
commit
4e7bfaab8b
1 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ export namespace Log {
|
|||
export function file() {
|
||||
return logpath
|
||||
}
|
||||
let write: (msg: string) => void
|
||||
let write = process.stderr.write
|
||||
|
||||
export async function init(options: Options) {
|
||||
if (options.level) level = options.level
|
||||
|
|
@ -65,7 +65,7 @@ export namespace Log {
|
|||
const logfile = Bun.file(logpath)
|
||||
await fs.truncate(logpath).catch(() => {})
|
||||
const writer = logfile.writer()
|
||||
write = (msg) => {
|
||||
write = (msg: any) => {
|
||||
writer.write(msg)
|
||||
writer.flush()
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue