Struct dipstick::Log

source ·
pub struct Log { /* private fields */ }
Expand description

Buffered metrics log output.

Implementations§

Write metric values to the standard log using info!.

Examples found in repository?
examples/raw_log.rs (line 12)
10
11
12
13
14
15
16
17
pub fn raw_write() {
    // setup dual metric channels
    let metrics_log = dipstick::Log::to_log().metrics();

    // define and send metrics using raw channel API
    let counter = metrics_log.new_metric("count_a".into(), dipstick::InputKind::Counter);
    counter.write(1, labels![]);
}

Sets the log target to use when logging metrics. See the (log!)[https://docs.rs/log/0.4.6/log/macro.log.html] documentation.

Sets the log target to use when logging metrics. See the (log!)[https://docs.rs/log/0.4.6/log/macro.log.html] documentation.

Trait Implementations§

Return a clone with the specified buffering set.
Return the current buffering strategy.
Returns false if the current buffering strategy is Buffering::Unbuffered. Returns true otherwise.
Wrap an input with a metric definition cache. This can provide performance benefits for metrics that are dynamically defined at runtime on each access. Caching is useless if all metrics are statically declared or instantiated programmatically in advance and referenced by a long living variable.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Specify formatting of output.
The type of Scope returned byt this input.
Open a new scope from this input.
👎Deprecated since 0.7.2: Use metrics()
Open a new scope from this input.
👎Deprecated since 0.8.0: Use metrics()
Open a new scope from this input.
Wrap this output with an asynchronous dispatch queue of specified length.
Return attributes of component.
Return attributes of component for mutation.
Clone the component and mutate its attributes at once.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.