Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow not appending timestamp to current log file #64

Merged
merged 3 commits into from
Sep 17, 2021

Commits on Sep 16, 2021

  1. 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.
    schmichael committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    23b3dd9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    daa4b1c View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2021

  1. 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.
    schmichael committed Sep 17, 2021
    Configuration menu
    Copy the full SHA
    8e33db4 View commit details
    Browse the repository at this point in the history