From 6bb9bc2b4d595374e8320535439e522ac3f347da Mon Sep 17 00:00:00 2001 From: Ammar Arif Date: Fri, 5 Jul 2024 23:40:24 -0400 Subject: [PATCH] add docs --- crates/katana/node-bindings/src/json.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/katana/node-bindings/src/json.rs b/crates/katana/node-bindings/src/json.rs index 3dec9efcd3..ca717d38a1 100644 --- a/crates/katana/node-bindings/src/json.rs +++ b/crates/katana/node-bindings/src/json.rs @@ -1,4 +1,17 @@ //! Utilities for parsing the logs in JSON format. This is when katana is run with `--json-log`. +//! +//! When JSON log is enabled, the startup details are all printed in a single log message. +//! Example startup log in JSON format: +//! +//! ```json +//! {"timestamp":"2024-07-06T03:35:00.410846Z","level":"INFO","fields":{"message":"{\"accounts\":[[\ +//! "318027405971194400117186968443431282813445578359155272415686954645506762954\",{\"balance\":\" +//! 0x21e19e0c9bab2400000\",\"class_hash\":\" +//! 0x5400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c\",\"private_key\":\" +//! 0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\" +//! 0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"}]],\"address\":\"0.0.0.0: +//! 5050\",\"seed\":\"0\"}"},"target":"katana::cli"} +//! ``` use serde::Deserialize;