-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add debug logging #285
Add debug logging #285
Conversation
What I really want is the git commit sha, but that would be require integration into the pipeline building. I would settle for the crate version but that's less good because there are less assurances... that could easily fall through the cracks. Anyways, neither are strictly necessary at this moment, @diehuxx could you create a Issue on the backlog with all of the necessary context for this? |
Adding a git commit hash in the debug log is the most bulletproof way to debug production issues at scale. Because then you just open git and you have strong assurances you're reading the source code of the exact artifact that is running. |
crates/web5/Cargo.toml
Outdated
@@ -15,6 +15,7 @@ josekit = "0.8.6" | |||
jsonpath-rust = "0.5.1" | |||
jsonschema = { version = "0.18.0", default-features = false } | |||
k256 = { version = "0.13.3", features = ["ecdsa", "jwk"] } | |||
lazy_static = "1.5.0" |
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.
can we update the Justfile to 1.80.0 and use the new LazyLock? I'm doing that over here https://github.com/TBD54566975/web5-rs/pull/283/files#diff-8b2fda406bc73cf365197448d20bd9ea1d05db17e9b8dca69881ad9dd9755f5d (scroll down to the tests)
crates/web5/src/lib.rs
Outdated
@@ -4,3 +4,30 @@ pub mod dids; | |||
|
|||
#[cfg(test)] | |||
mod test_helpers; | |||
|
|||
lazy_static::lazy_static! { |
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.
could we use the LazyLock
or LazyCell
here and then remove the addition of lazy_static
in the Cargo.toml
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.
Upd8d
* Add web5_proc_macros with git_sha proc macro * Use short SHA, case insensitive log level, remove kt code * PR review * Fix linting, fix linux builds * Fix CLI build
* debug-logging-include-str: Remove git sha compiler flag git ignore git sha resource Remove git hash from kotlin logger Build resources file with git SHA
Add macro for debug logging and env var to github actions, patterned off tbdex-rs (https://github.com/TBD54566975/tbdex-rs/pull/111/files). Addresses the line of this issue "Add debug logging like we did over in tbdex-rs" #277.
Open Question: In the line "Add version to debug logs" of this issue #277, does that refer to the web5 crate version?