silk.trace.log.
Records structured ambient log events with the current W3C trace and span identifiers.
Import as OtelLogger with import silk.trace.log { OtelLogger }.
Public declarations: 2.
OtelLogger#
pub struct OtelLoggerAn ambient Logger provider that appends OpenTelemetry logs to a recorder.
Implementation OtelLogger#
impl OtelLoggerAssociated function make#
pub fn make(recorder: &Arc<Recorder>) -> SelfShares the recorder's queue with an ambient log scope.
Method forwarding#
pub fn forwarding<P: Concurrent + Transferable>(self: Self, inner: &Arc<P>) -> ForwardingLogger<P>Returns a provider that both records and forwards every event to the supplied Logger provider.
Implementation Logger for OtelLogger#
impl Logger for OtelLoggerOperation log#
effect fn log<Args>(self: &Self, level: LogLevel, static template: string<'static>, args: &Args) -> ()ForwardingLogger#
pub struct ForwardingLogger<P>An OpenTelemetry logger that also supplies the event to an inner ambient provider.
Implementation Logger for ForwardingLogger<P>#
impl<P: Concurrent + Transferable> Logger for ForwardingLogger<P>Operation log#
effect fn log<Args>(self: &Self, level: LogLevel, static template: string<'static>, args: &Args) -> ()Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.