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

custom date/time and header format #170

Closed
2x2xplz opened this issue Dec 14, 2023 · 0 comments · Fixed by #175
Closed

custom date/time and header format #170

2x2xplz opened this issue Dec 14, 2023 · 0 comments · Fixed by #175
Labels
enhancement New feature or request

Comments

@2x2xplz
Copy link

2x2xplz commented Dec 14, 2023

Perhaps I'm missing something, but there does not appear to be an easy way to customize the date/time format of the log entries or the metadata header. For example, instead of
[WARNING] | 20:38:08 851ms | this is my log message
the developer might prefer
[WARN 2023-12-13 20:38:08.851] this is my log message

From what I can tell, to make this change one would have to override or add new methods to TalkerDateTimeFormatter then either override TalkerDataInterface.displayTitleWithTime or create a custom TalkerDataInterface, and then somewhere, replace the default versions with your custom/overridden versions of these classes.

Describe the solution you'd like
to be able to define the metadata header format as easily as creating and using a custom LoggerFormatter

Describe alternatives you've considered
I'm aware you can create an entirely custom log type, however this prevents you from using the default talker.info, talker.debug, etc and you're stuck with talker.logTyped(YourCustomLog('Something like your own service message'));

Additional context
There is a lot to like about talker and the ecosystem you've built but given all the possible customization options, it feels strange to not be able to re-define the metadata header format.

@Frezyx Frezyx added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Dec 14, 2023
@Frezyx Frezyx linked a pull request Jan 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants