Skip to content

Commit

Permalink
fix(std/log): use writeAllSync instead of writeSync (denoland#5868)
Browse files Browse the repository at this point in the history
Deno.writeSync:
Returns the number of bytes written. 
It is not guaranteed that the full buffer will be written in a single call.
  • Loading branch information
fuxingZhang committed May 26, 2020
1 parent f462f7f commit 24c36fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/log/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 24c36fd

Please sign in to comment.