# How to log in rust canisters

**URL:** <https://forum.dfinity.org/t/how-to-log-in-rust-canisters/28247>\
**Category:** Rust\
**Created:** [March 8, 2024, 1:06pm UTC](https://forum.dfinity.org/t/how-to-log-in-rust-canisters/28247 "2024-03-08T13:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frederico02](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@frederico02](https://forum.dfinity.org/u/frederico02)\
**Post date:** [March 8, 2024, 1:06pm UTC](https://forum.dfinity.org/t/how-to-log-in-rust-canisters/28247/1 "2024-03-08T13:06:03Z")

</div>

As per the docs docs/current/developer-docs/developer-tools/cli-tools/cli-reference/dfx-canister#dfx-canister-logs

I’m trying to get all the logs of my canister using the command specified in the above doc but it looks like that command has been removed or in dfx 0.17.0 it isn’t available as my --help doesn’t show the command as existing.

So I have two questions  
How can i quickly get all the logs?  
How can i log out complex data structures in a rust canister?

All the best 🙂

---

<div class="post-metadata">

**Author:** ![frederico02](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@frederico02](https://forum.dfinity.org/u/frederico02)\
**Post date:** [March 8, 2024, 1:06pm UTC](https://forum.dfinity.org/t/how-to-log-in-rust-canisters/28247/2 "2024-03-08T13:06:58Z")

</div>

e.g `dfx canister logs <my-canister-name>`

---

<div class="post-metadata">

**Author:** ![frederico02](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@frederico02](https://forum.dfinity.org/u/frederico02)\
**Post date:** [March 8, 2024, 1:25pm UTC](https://forum.dfinity.org/t/how-to-log-in-rust-canisters/28247/3 "2024-03-08T13:25:02Z")

</div>

Well I found the answer to my own question about complex data structures and I guess i can use the println macro for now but for all the tracing logs I would still like to know if theres a way to get that data using dfx.

---

<div class="post-metadata">

**Author:** ![frederico02](https://avatars.discourse-cdn.com/v4/letter/f/7bcc69/32.png) [@frederico02](https://forum.dfinity.org/u/frederico02)\
**Post date:** [March 8, 2024, 1:27pm UTC](https://forum.dfinity.org/t/how-to-log-in-rust-canisters/28247/4 "2024-03-08T13:27:11Z")

</div>

Okay, Now i see that i need to be on 0.18.0 lol.

Ignore everything. I solved my own problems 😆
