Append logs instead instead overwriting (#2215)
This commit is contained in:
1 parent
bbfef3e832
commit
cc112beb78
3 files changed
+3
-2
No files matched your search
@@ -43,6 +43,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- The experimental `locale` option has been removed in favor of the recommendation to use `addcustominfo`/`set sortby custom` for custom sorting (#2111).
|
||||
- The existing `doc` command has been renamed to `help` so that it is more natural for users (#2125).
|
||||
- Text previews are no longer displayed with a padding of two spaces by default (#2131). Instead, a custom padding can be added in the `previewer` script, for example by piping to `sed 's/^/ /'`.
|
||||
- Logs generated by `-log <path>` now get appended to `<path>` instead of overwriting it (#2215).
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
|
||||
func run() {
|
||||
if gLogPath != "" {
|
||||
f, err := os.OpenFile(gLogPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600)
|
||||
f, err := os.OpenFile(gLogPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o600)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to open log file: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user