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

install specifies a timestamp pattern #32

Open
NoahTheDuke opened this issue Oct 24, 2023 · 1 comment
Open

install specifies a timestamp pattern #32

NoahTheDuke opened this issue Oct 24, 2023 · 1 comment

Comments

@NoahTheDuke
Copy link
Contributor

#24 added a timestamp pattern that is less granular than the default :iso8601 pattern in Timbre. I'm not sure why this is. We've run into issues with log lines being out of order due to other tools having greater granularity (matching the timbre defaults) than tja's default.

Maybe a solution would be to change install to pass-through the given options to timbre itself, so folks can specify all of their timbre and timbre-json-appender config in one call?

Either way, once I discovered this, I switched us to using tja/json-appender directly as we need the greater timestamp granularity.

Thanks for the great library, it's a real godsend.

@viesti
Copy link
Owner

viesti commented Oct 27, 2023

Hmm, true, good point!

I think the root of this is that the lib probably should have been an appender only, left to the user to configure to be used with Timbre.

While install is convenient, this gets in the way later. The pass-through is a nice idea though! :) Requires changing the arguments to the install call though, either two map arguments or say :timbre-config and:json-appender-config keys in the single map argument, with the latter we could check if the new keys are present, then pass config accordingly, otherwise behave "the old way", to not break library users.

Also good find on the timestamp format! In retrospect, should have had that change in my mind, kind of hard to see surface area of changes :) Following the Clojure way on non-breaking changes is kind of hard, but learning bit by bit :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants