pub enum LoggingError {
Directory {
directory: PathBuf,
source: PathsError,
},
Appender {
directory: PathBuf,
attempts: String,
},
AlreadyInstalled {
message: String,
},
}Expand description
The sink could not be installed.
Variants§
Directory
The application-data directories could not be created.
Carries a crate::paths::PathsError rather than a bare
std::io::Error because install creates logs/ through
crate::paths::AppPaths::create_all, which is what applies the 0700
restriction; the source therefore names whichever of the four
directories actually failed, and that need not be logs/.
Fields
source: PathsErrorThe underlying error.
Appender
No diagnostics file in logs/ could be opened for appending.
Both stems are named because install tries two — the role’s own, and
then one qualified by the account — and an operator who is told only
about the second would go looking for a file this process never reached
for first.
The two attempts are composed into one string rather than carried as
four fields. As four this variant reached 128 bytes on Windows — where
PathBuf is wider than on the Unixes — and tripped
clippy::result_large_err, which is a lint about every success path
paying for the size of a failure. The message is the same either way,
and only this error is ever built.
Fields
AlreadyInstalled
A global subscriber was already installed.
Trait Implementations§
Source§impl Debug for LoggingError
impl Debug for LoggingError
Source§impl Display for LoggingError
impl Display for LoggingError
Source§impl Error for LoggingError
impl Error for LoggingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()