Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

client: improve log formatting #7272

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Conversation

andresilva
Copy link
Contributor

@andresilva andresilva commented Oct 6, 2020

Improve log formatting so that it is more inline with the format before #6825 was introduced.

Examples:

  • Before Use tracing-based subscriber logging #6825: 2020-10-06 16:06:48.467 main INFO sc_cli::runner Substrate Node
  • master: Oct 06 16:06:48.467 INFO Substrate Node
  • This PR: 2020-10-06 16:06:48.467 INFO main sc_cli::runner: Substrate Node

Unfortunately I did not find a way to change the order of log level / target / thread name so it's not exactly the same format as before.

Additionally, we use a simplified formatting if no log filters for anything higher than info are enabled.

❯ ./target/debug/substrate --dev --tmp
2020-10-06 22:26:53  Running in --dev mode, RPC CORS has been disabled.
2020-10-06 22:26:53  Substrate Node
2020-10-06 22:26:53  ✌️  version 2.0.0-fb82769a2-x86_64-linux-gnu
❯ ./target/debug/substrate --dev --tmp -lsync=trace
2020-10-06 22:27:10.842   WARN main sc_cli::commands::run_cmd: Running in --dev mode, RPC CORS has been disabled.
2020-10-06 22:27:10.842   INFO main sc_cli::runner: Substrate Node
2020-10-06 22:27:10.842   INFO main sc_cli::runner: ✌️  version 2.0.0-fb82769a2-x86_64-linux-gnu

@andresilva andresilva added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Oct 6, 2020
@bkchr bkchr merged commit d67fc4c into master Oct 7, 2020
@bkchr bkchr deleted the andre/improve-log-formatting branch October 7, 2020 08:53
ordian added a commit that referenced this pull request Oct 9, 2020
…up-updates

* master:
  Async keystore + Authority-Discovery async/await (#7000)
  Fixes logging of target names with dashes (#7281)
  seal: Add automated weights for contract API calls (#7017)
  add ss58 id for nodle (#7279)
  Refactor CurrencyToVote (#6896)
  bump-allocator: document & poison (#7277)
  Reset flaming fir network (#7274)
  reschedule (#6860)
  Drop system cache for trie benchmarks (#7242)
  client: improve log formatting (#7272)
  Rework `InspectState` (#7271)
  SystemOrigin trait (#7226)
  Update ss58 registry for Dock network (#7263)
  .maintain/monitoring: Add alert when continuous task ends (#7250)
  Rename `TRANSACTION_VERSION` to `EXTRINSIC_VERSION` (#7258)
  Split block announce processing into two parts (#6958)
  Fix offchain election to respect the weight (#7215)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants