-
Notifications
You must be signed in to change notification settings - Fork 284
Closed
Description
Debug logs are very linear. It's often very hard to detect when a specific scope of some kind has been left. I can probably implement it without it being a breaking change. Here's my design idea:
Add set_indent and get_indent methods to the Log trait with default impls that do nothing. Add a log_indent! macro to set the log indent, increase it by one or decrease it by one depending on the args. Future work might also make it create a scope lock to decrease the scope level again at the end of the scope.
Does anything speak against doing this? Technically I could do it as a new logger impl, but it would be very tedious to repeat the entire env logger impl.
Change env_logger to indent the log message by the current level.
Metadata
Metadata
Assignees
Labels
No labels