Closed glihm closed 2 months ago
Integrate in the logging the env variables mentioned by @kariy here: https://github.com/dojoengine/dojo/pull/1405/files#r1446910564.
Hi, can I take this issue?
Hi, can I take this issue?
Fore sure, assigned! Please don't hesitate if you have any questions.
I've been exploring the code and I'm not sure I understand the problem well. Could you provide more details on what the desired behavior should be?
Hey @DanielUH2019!
Sozo is lacking of logging, and a developer should be able by setting the RUST_LOG=trace
to have more context on what sozo is doing. The idea of this issue is adding logs in important places where we would appreciate more information while sozo is running.
For the structured loggin, take this example: https://github.com/dojoengine/dojo/blob/68e81f65df92837cffcdd4f0b498a3b71edb55a9/bin/sozo/src/commands/test.rs#L118
This should use something like:
trace!(?project_config, "project config");
Like so, sozo
logs can easily be parsed by other tools when running on the cloud or monitored environment.
Hey @DanielUH2019 how do you feel about this issue? Any update?
Hey, sorry for the delay. I've been very busy this week, but I'm still committed to solving this issue. I'm not sure if I'll be able to address it before the OnlyDust Hack ends, but I'll do my best.
Hi @DanielUH2019, if you haven't started on this one can I work on it? @glihm, @tarrencev
Hi @tirth1, I couldn't continue working on that. I'll unassign myself from the issue.
@glihm can I work on this?
@glihm can I work on this?
Hey @tirth1! For sure go ahead! Sozo is being reworked on several points currently, you may have to rebase depending on where your PR is being opened. :)
@glihm: I'm trying to explore code and documents, but I couldn't find the steps to run the project from source code.
@glihm: I'm trying to explore code and documents, but I couldn't find the steps to run the project from source code.
you can run sozo
using:
cargo run --bin sozo
@glihm: I'm trying to explore code and documents, but I couldn't find the steps to run the project from source code.
We've an issue pending for tracking this missing info (#1711), the detailed setup will be covered soon.
As @kariy mentioned you will need:
cargo
, install here.cargo run --bin sozo
to build sozo only.cargo test -p sozo
to run tests on sozo.katana --disable-fee
(Katana binary can be run from dojo up installation or with cargo run --bin katana
).cargo run --bin sozo -- migrate apply --manifest-path ./examples/spawn-and-move/Scarb.toml
.
Is your feature request related to a problem? Please describe. Currently, Sozo is not printing development information when
RUST_LOG=
is used.Describe the solution you'd like It would be great to have a
trace
level that can inform a developer what's exactly happening on Sozo, to debug and understand some behavior we may encounter in Sozo.This should be done using structured logging supported by tracing.
Example: