0

tracing_subscriber provides a compact format that looks like this:

DEBUG nh::nixos:51: out_dir: TempDir { path: "/tmp/nh-os-uC6E1T" }
DEBUG nh::nixos:52: out_link "/tmp/nh-os-uC6E1T/result"
 INFO nh::commands:131: Building NixOS configuration

I want to change the symbols used ( INFO, DEBUG, etc), but I can't find how (if this is possible at all).

/examples/examples/fmt-compact.rs

viperML
  • 21
  • 1

1 Answers1

2

Unfortunately, this is not possible. Format hardcodes the level names.

If you really want to do that, you can make your own type implementing FormatEvent and overwrite Format with it via Layer::event_format().

Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77