-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow not appending timestamp to current log file (#64)
* allow not appending timestamp to current log file Backward compatible version of #62 -- This version does *not* change the default behavior. Users must opt in to new behavior. This patch updates the file sink to allow *not* appending the timestamp on the current log file. In this mode the timestamp is only appended when the file is rotated. This matches the behavior: - Implemented in Nomad v1.1.4 with hashicorp/nomad#11070 - Requested in hashicorp/nomad#11061 > The following example configures a destination called "My Sink" which > stores audit events at the file `/tmp/audit.json`. Nomad's documentation is a little vague but implies the prior behavior of always appending a timestamp. Also fixed one flaky test: * time may be either the same of after While Go compares time using a monotonic clock that only prevents time from moving *backward,* it does *not* guarantee time will move forward between subsequent calls to `time.Now()`. The After assertion failed in a test run on Github because it is missing the `Equal` comparison on the preceeding assertion.
- Loading branch information
1 parent
5f3719c
commit 9071133
Showing
4 changed files
with
132 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters