diff options
| author | Chris Knight <cknight1234@gmail.com> | 2020-06-01 23:31:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-01 18:31:17 -0400 |
| commit | c9aded05a6b5e4825e9be362013be74fd51e8620 (patch) | |
| tree | edad98e8143a92aba2b7daaf772d8cfeb494ed7a /std/log/README.md | |
| parent | b693ca7f7f21f9775c08dfbf038e6d3557f6daeb (diff) | |
feat(std/log): buffered file logging (#6014)
Diffstat (limited to 'std/log/README.md')
| -rw-r--r-- | std/log/README.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/std/log/README.md b/std/log/README.md index 55b2b6cdb..4c69784f9 100644 --- a/std/log/README.md +++ b/std/log/README.md @@ -107,7 +107,10 @@ interface HandlerOptions { #### `FileHandler` This handler will output to a file using an optional mode (default is `a`, e.g. -append). The file will grow indefinitely. This logger takes `FileOptions`: +append). The file will grow indefinitely. It uses a buffer for writing to file +and will automatically flush every 30 seconds, though you can trigger this +yourself with `fileHandler.flush()`. Log messages with a log level greater than +error are immediately flushed. This logger takes `FileOptions`: ```typescript interface FileHandlerOptions { @@ -148,6 +151,11 @@ backups to keep), `log.txt.1` would be renamed to `log.txt.2`, `log.txt` would be renamed to `log.txt.1` and finally `log.txt` would be created from scratch where the new log message would be written. +This handler uses a buffer for writing to file and will automatically flush +every 30 seconds, though you can trigger this yourself with +`fileHandler.flush()`. Log messages with a log level greater than error are +immediately flushed. + Options for this handler are: ```typescript |
