gear-tech / gear

Web3 Ultimate Execution Engine
https://gear-tech.io
GNU General Public License v3.0
237 stars 105 forks source link

Even better logging fmt for the `gear-node-loader` #1653

Open techraed opened 2 years ago

techraed commented 2 years ago
  1. Need some balance in logging information. Logging at what field the log was done or the stack of functions with full path is noisy. Need to make from this

    at utils/node-loader/src/batch_pool.rs:167
    in gear_node_loader::batch_pool::run_batch_impl
    in gear_node_loader::batch_pool::run_batch with seed: 9927380856200300910, batch_type: "upload_program"
    in gear_node_loader::batch_pool::run

    something like this:

    [gear_node_loader::batch_pool::run_batch] seed: 9927380856200300910, batch_type: "upload_program"
  2. Implement logging to different destinations a different level information. For example, we can log to file data with TRACE max level, but to stdout up to DEBUG.

clearloop commented 1 year ago

sth like https://crates.io/crates/slog could help, but it is outdated tbh

techraed commented 1 year ago

It's mostly about how formatter is implemented for the tracing