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

How can we customize logging in hanami 2? #1283

Open
MasanoriOnishi opened this issue Feb 3, 2023 · 2 comments
Open

How can we customize logging in hanami 2? #1283

MasanoriOnishi opened this issue Feb 3, 2023 · 2 comments
Assignees

Comments

@MasanoriOnishi
Copy link
Contributor

MasanoriOnishi commented Feb 3, 2023

We want add user_id to the following default logging.(For example, if env['user_id'] exists.)

def data(env, status:, elapsed:)

Is there any other way that we can do so except for by overriding the code above?

@solnic solnic self-assigned this Mar 1, 2023
@solnic
Copy link
Member

solnic commented Mar 2, 2023

Refs #1294

@MasanoriOnishi
Copy link
Contributor Author

@solnic Thank you for your reply!

We don't want to change hanami logger format(ex. Hanami.logger.info), but change rack logging.
So we have to override the method, we think.

def data(env, status:, elapsed:)

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