-
Notifications
You must be signed in to change notification settings - Fork 8
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
Issue/79 | Add logger #84
Conversation
3d2cdd6
to
daeb0da
Compare
If you write "fix #79" in the description the issues will be linked |
@DanGould Cab you rerun the test job please?
|
@DanGould ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for grabbing this chore and implementing it really well.
I suggest we change the option to a default. CARGO_LOG envvar is set on debug by default when you run a default build anyhow, and in production it will default to info level.
README.md
Outdated
4. Run with `nolooking --conf nolooking.conf` | ||
5. Visit Nolooking on [127.0.0.1](http://127.0.0.1:3000) and queue some bitcoin channels. | ||
6. Generate the QR code, pay it or share it! Once a payjoin transaction has enough confirmations, your new lightning channels will be established and you can move your sats over the lightning nework! | ||
4. (Optional) nolooking uses [env_logger](https://docs.rs/env_logger/latest/env_logger/) to log messages varying priority. Use `RUST_LOG` env var to set your log priority. Valid options are error, warn, info, debug, trace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On principle we avoid options whenever possible. env_logger
affords us sane defaults: rust-cli/env_logger#47 (comment)
src/http.rs
Outdated
@@ -81,7 +82,7 @@ async fn serve_public_file(path: &str) -> Result<Response<Body>, HttpError> { | |||
} | |||
|
|||
async fn handle_pj(scheduler: Scheduler, req: Request<Body>) -> Result<Response<Body>, HttpError> { | |||
dbg!(req.uri().query()); | |||
info!("{:?}", req.uri().query()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: If display isn't implemented, this is probably debug, not info
fix #79