1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum BuildError {
6 #[cfg(feature = "file")]
8 #[error("invalid file configuration: {0}")]
9 InvalidFileConfig(&'static str),
10
11 #[cfg(feature = "file")]
13 #[error("file sink I/O error: {0}")]
14 Io(#[from] std::io::Error),
15}
16
17#[derive(Debug, Error)]
19pub enum InitError {
20 #[error("a global tracing subscriber is already installed")]
22 AlreadyInitialized,
23
24 #[cfg(feature = "log")]
26 #[cfg_attr(docsrs, doc(cfg(feature = "log")))]
27 #[error("the global log bridge is already installed")]
28 LogBridgeAlreadyInitialized,
29
30 #[error(transparent)]
32 Build(#[from] BuildError),
33}