From 24c36fd8625df6b276108109478a62b4661a0b3f Mon Sep 17 00:00:00 2001 From: zfx <502545703@qq.com> Date: Tue, 26 May 2020 21:54:30 +0800 Subject: [PATCH] fix(std/log): use writeAllSync instead of writeSync (#5868) Deno.writeSync: Returns the number of bytes written. It is not guaranteed that the full buffer will be written in a single call. --- std/log/handlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/log/handlers.ts b/std/log/handlers.ts index b22f458ac2..ffcd846cc6 100644 --- a/std/log/handlers.ts +++ b/std/log/handlers.ts @@ -125,7 +125,7 @@ export class FileHandler extends WriterHandler { } log(msg: string): void { - Deno.writeSync(this._file.rid, this.#encoder.encode(msg + "\n")); + Deno.writeAllSync(this._file, this.#encoder.encode(msg + "\n")); } destroy(): Promise {