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

Add new logging format option, 'json-ts', for JSON formatted logs with timestamps #24307

Merged

Commits on Apr 3, 2023

  1. logging: add new format 'json-ts' for JSON logs with timestamps

    This commit adds a new log formatter named 'json-ts', which can be used
    to enable json logs that include timestamps. Normally, timestamps for
    logs can be collected through the use of k8s container logging system,
    ie by passing `--timestamps` to `kubectl logs`. Relying on k8s for log
    timestamps is not always available however, therefore it is useful to
    have the ability to add timestamps if needed in special cases.
    
    One case in which this is useful is for programmatically parsing through
    the `cilium-cni` log file, in order to observe and record CNI events.
    
    Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
    learnitall committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    5ba11e0 View commit details
    Browse the repository at this point in the history