[WIP] add option for extended logging #567
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe there is a bug in the config code.
As soon as there is a default value defined in the struct, env vars seem to be ignored.
I have added a debug output for you to see the problem:
If you remove the default
default:"true"
inconfig/config.go
, it works. (It will heed the value ofGOTIFY_EXTENDEDLOGFORMAT
.)I have marked this PR as work in progress, since I ran into this little problem and because you haven't decided whether you want to add this yet.
However, please let me stress this again: a TZ info is rather important. I am pretty sure that most system admins will agree. The "
[GIN]
" text is also not very useful.You also mentioned using a standard format like Apache/nginx. I have to say that the default Apache or NCSA log format does not use a proper date format. Your log looks actually quite nice. The pipe symbols are perfectly valid field separators, because they are not part of any of the fields' potential values.
Fixes #565