mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #428] How to change log level? #251
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @0xERR0R on GitHub (Mar 8, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/428
Bitwarden_rs docker container logs each http request with "INFO" message. How can I change the log level to "critical" to avoid these messages. I just want to have only errors in docker log.
I tried to set the environment variable "ROCKET_LOG" to "critical", but the info messages are still there.
Thank you in advance
@mprasil commented on GitHub (Mar 8, 2019):
Hi, you should be able to do this by setting
EXTENDED_LOGGINGto false.@0xERR0R commented on GitHub (Mar 8, 2019):
I tried it, it looks different (without log level entry), but I still see entries like
GET /api/sync application/json:=> Matched: GET /api/sync?<data..> (sync)...@dani-garcia commented on GitHub (Mar 8, 2019):
You'll need to use both, in this case:
At the moment the extended logging needs to be disabled because it hardcodes the debug level, in the future we should change that.
@0xERR0R commented on GitHub (Mar 8, 2019):
Thank you, it helped. It works now as expected. This should be documented here: https://github.com/dani-garcia/bitwarden_rs/wiki/Logging
@mprasil commented on GitHub (Mar 8, 2019):
You can edit the page and add that if you have some time. 😉
@0xERR0R commented on GitHub (Mar 8, 2019):
I added the "Change the log level" section to the page, please review
@mprasil commented on GitHub (Mar 8, 2019):
That is perfect, thanks a lot for this @0xERR0R. I'm going to close this now as it seems the question has been answered and documentation is up to date.
@jstirling commented on GitHub (Apr 21, 2019):
I don't think this is a valid solution to the issue. With extended_logging set to false, you no longer receive failed login errors. Which in turn means Fail2Ban won't work.
@dani-garcia commented on GitHub (Apr 21, 2019):
This was implemented a couple of weeks ago, check the .env template:
github.com/dani-garcia/bitwarden_rs@253faaf023/.env.template (L46-L50)@jstirling commented on GitHub (Apr 21, 2019):
Seems to have hit the spot. Thanks for the quick reply before my log exploded 😋
Would suggest updating the wiki with that as well.
@emorgoch commented on GitHub (Jul 18, 2019):
So I'm not sure I'm getting this. I've updated my docker (running on unraid) to set ROCKET_LOG=critical, and EXTENDED_LOGGING=false. However, now I'm not getting any logs.
What should be the correct parameters to get just errors (and warnings if needed), as that's what failed login attempts show up as?
@dani-garcia commented on GitHub (Jul 20, 2019):
You can use LOG_LEVEL=warn, but that requires EXTENDED_LOGGING=true. (The available errors are https://docs.rs/log/0.4.7/log/enum.Level.html#variants)
@emorgoch commented on GitHub (Jul 21, 2019):
Thanks. That seems to be working. May want to updated the Logging documentation, as it says to use ROCKET_LOG instead of LOG_LEVEL.