You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.
Is your feature request related to a problem? Please describe.
The current log configuration includes the number of seconds from service start on every log line. This timestamp is not useful because it cannot be easily determined when specific logs occurred.
Describe the solution you'd like
The easy solution is to change from text to logfmt handler type.
Describe alternatives you've considered
The code includes a comment to allow different formats, but supporting this requires a lot more work due to many formats having required configuration.
What version of git2consul-go are you using?
$ git2consul -version
git2consul, version v0.1.2-dev (branch: master, revision: 9f404c06fe43479f3d81f237cee0ae93b3964905)
build date: 20200226-18:56:58
go version: go1.13.3
Additional context
Switching to logfmt would result in more usable logs like:
@kadaan I do not see an option in apex log for setting format and adding appropriate timestamps. Also, this is still open.
Adding an option to switch to structured log formation as a quick fix flag.StringVar(&logfmt, "logfmt", "text", "specify log format [text | json] ").
Output will look like this {"fields":{"caller":"main"},"level":"info","timestamp":"2020-05-14T17:05:12.820147-07:00","message":"Starting git2consul version: v0.1.2-dev"} {"fields":{"caller":"config"},"level":"info","timestamp":"2020-05-14T17:05:12.821287-07:00","message":"Setting configuration with sane defaults"} {"fields":{"caller":"repository"},"level":"info","timestamp":"2020-05-14T17:05:12.821835-07:00","message":"Loaded repository test-example"} {"fields":{"error":"reference not found"},"level":"error","timestamp":"2020-05-14T17:05:13.824648-07:00","message":"Runner error"}
Is your feature request related to a problem? Please describe.
The current log configuration includes the number of seconds from service start on every log line. This timestamp is not useful because it cannot be easily determined when specific logs occurred.
Describe the solution you'd like
The easy solution is to change from
text
tologfmt
handler type.Describe alternatives you've considered
The code includes a comment to allow different formats, but supporting this requires a lot more work due to many formats having required configuration.
What version of git2consul-go are you using?
Additional context
Switching to
logfmt
would result in more usable logs like:The text was updated successfully, but these errors were encountered: