diff options
author | zfx <502545703@qq.com> | 2020-05-26 21:54:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 09:54:30 -0400 |
commit | 24c36fd8625df6b276108109478a62b4661a0b3f (patch) | |
tree | f543e8e40fda8f64edcea94d0dc6ba3be6fed98c | |
parent | f462f7fe54d59b2d56ffbb03ca8467ce93096817 (diff) |
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.
-rw-r--r-- | std/log/handlers.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/log/handlers.ts b/std/log/handlers.ts index b22f458ac..ffcd846cc 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<void> { |