Skip to content

Commit

Permalink
fix(log): use writeAllSync instead of writeSync (denoland/deno#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 authored and denobot committed Feb 1, 2021
1 parent 309e1cb commit f5a3167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 f5a3167

Please sign in to comment.