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

Configurable string formatter #7

Merged
merged 7 commits into from
Nov 5, 2022
Merged

Conversation

solnic
Copy link
Member

@solnic solnic commented Nov 5, 2022

This adds support for template option when setting up loggers:

irb(main):001:0> logger = Dry.Logger(:hello, template: "OMG IT'S A LOG: %<message>s")
=> 
#<Dry::Logger::Dispatcher:0x00000001049b4010
...
irb(main):002:0> logger.info("hello")
OMG IT'S A LOG: hello
=> true

Following tokens are supported:

  • message
  • severity
  • time
  • progname

@solnic solnic merged commit f9fb72a into main Nov 5, 2022
@solnic solnic deleted the configurable-string-formatter branch November 5, 2022 15:43
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

Successfully merging this pull request may close these issues.

None yet

1 participant