pub enum TracingConfigError {
Show 15 variants
InvalidLevel {
level: String,
},
ConfigFileNotFound,
AlreadyInitialized,
TracingConfigGuardDropped,
FilterNotFound {
filter: String,
layer: String,
},
FilterParseError {
filter: String,
layer: String,
error: ParseError,
},
WriterNotFound {
writer: String,
layer: String,
},
LayerNotFound {
sifted_layer: String,
layer: String,
},
SiftingLayerConf {
sifted_layer: String,
layer: String,
error_message: String,
},
MissingEnvironmentVariable(VarError),
IoError(Error),
Deserialization(Error),
Serialization(Error),
FileInitError(InitError),
PoisonError(String),
}
Expand description
The only error type in this crate, wraps other errors.
There is no need for multiple error types since this crate is not meant to be used
extensively by applications, it is rather meant to be used through a single init macro call in main()
with a panic
if something goes wrong.
In future versions I might decide to split the errors so that, upon any function call, you only get the specific error that specific function fails at, rather than every possible crate error.
Variants§
InvalidLevel
Invalid Level
ConfigFileNotFound
Could not find configuration file
AlreadyInitialized
TracingConfig was already initialized
TracingConfigGuardDropped
TracingConfig guard was dropped, do not drop the guard that the initialize function returns
FilterNotFound
A filter was referenced or is required, but it is not declared in the tracing.toml file
FilterParseError
Could not parse a filter / directive
Fields
error: ParseError
Indicates that a string could not be parsed as a filtering directive.
WriterNotFound
A writer was referenced but not declared
LayerNotFound
A referenced layer could not be found
Fields
SiftingLayerConf
There is a problem with how the Sifting Layer was configured
Fields
MissingEnvironmentVariable(VarError)
An environment variable was referenced but it’s missing
IoError(Error)
An IoError occurred
Deserialization(Error)
Could not deserialize a toml file.
Serialization(Error)
Could not serialize a toml file.
FileInitError(InitError)
Could not initialize a file writer
PoisonError(String)
An internal lock was poisoned, this shouldn’t happen, if it does it’s a bug in TracingConfig