Expand description
Substrate logging library.
This crate uses tokio’s tracing library for logging.
Structs§
- Event
Format - A pre-configured event formatter.
- Fast
Local Time - A structure which, when
Displayd, will print out the current local time. - Logger
Builder - A builder that is used to initialize the global logger.
- Prefix
Layer - A
Layerthat captures the prefix span (PREFIX_LOG_SPAN) which is then used bycrate::logging::EventFormatto prefix the log lines by customizable string.
Enums§
- Error
- Logging errors.
Constants§
- PREFIX_
LOG_ SPAN - Span name used for the logging prefix. See macro
sc_tracing::logging::prefix_logs_with!
Functions§
- add_
directives - Add directives to current directives.
- get_
directives - Returns the current directives.
- reload_
filter - Reload the logging filter with the supplied directives added to the existing directives
- reset_
log_ filter - Resets the log filter back to the original state when the node was started.
Type Aliases§
- Result
- Logging Result typedef.
Attribute Macros§
- prefix_
logs_ with - This prefixes all the log lines with
[<name>](after the timestamp). It works by making a tracing’s span that is propagated to all the child calls and child tasks (futures) if they are spawned properly with theSpawnHandle(seeTaskManagerin sc-cli) or if the futures use.in_current_span()(see tracing-futures).