Struct tracing_ecs::ECSLayerBuilder
source · pub struct ECSLayerBuilder { /* private fields */ }
Expand description
Builder for a subscriber Layer writing ECS compatible json lines to a writer.
Example:
use tracing_ecs::ECSLayerBuilder;
// creates a minimal layer logging to stdout, and install it
ECSLayerBuilder::default()
.stdout()
.install()
.unwrap();
Implementations§
source§impl ECSLayerBuilder
impl ECSLayerBuilder
pub fn with_extra_fields<F: Serialize>( self, extra_fields: F ) -> Result<Self, Error>
pub fn with_attribute_mapper<M>(self, attribute_mapper: M) -> Selfwhere M: AttributeMapper,
pub fn stderr(self) -> ECSLayer<fn() -> Stderr>
pub fn stdout(self) -> ECSLayer<fn() -> Stdout>
pub fn build_with_writer<W>(self, writer: W) -> ECSLayer<W>where W: for<'writer> MakeWriter<'writer> + 'static,
Trait Implementations§
source§impl Default for ECSLayerBuilder
impl Default for ECSLayerBuilder
source§fn default() -> ECSLayerBuilder
fn default() -> ECSLayerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ECSLayerBuilder
impl Send for ECSLayerBuilder
impl Sync for ECSLayerBuilder
impl Unpin for ECSLayerBuilder
impl !UnwindSafe for ECSLayerBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more