summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzfx <502545703@qq.com>2020-05-26 21:54:30 +0800
committerGitHub <noreply@github.com>2020-05-26 09:54:30 -0400
commit24c36fd8625df6b276108109478a62b4661a0b3f (patch)
treef543e8e40fda8f64edcea94d0dc6ba3be6fed98c
parentf462f7fe54d59b2d56ffbb03ca8467ce93096817 (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.ts2
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> {