Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tokio-rs/tracing
/ functions
Functions
2,480 in github.com/tokio-rs/tracing
⨍
Functions
2,480
◇
Types & classes
463
↓ 13 callers
Method
with_ansi
Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting. Enabling ANSI escapes (calling `with_ansi(tr
tracing-subscriber/src/fmt/mod.rs:633
↓ 12 callers
Function
filter_fn
()
tracing-subscriber/tests/layer_filters/main.rs:160
↓ 12 callers
Function
is_explicit_root
Convenience function that returns [`ExpectedAncestry::IsExplicitRoot`].
tracing-mock/src/expect.rs:278
↓ 12 callers
Method
name
Returns the span's name,
tracing-subscriber/src/registry/mod.rs:351
↓ 12 callers
Method
run
Consume this builder and return a [`MockLayer`] which can be set as the default subscriber. This function is similar to [`run_with_handle`], but it d
tracing-mock/src/layer.rs:817
↓ 12 callers
Method
with_ansi
Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting. When the "ansi" crate feature flag is enable
tracing-subscriber/src/fmt/fmt_layer.rs:331
↓ 12 callers
Method
with_timer
Use the given [`timer`] for log message timestamps. See [`time` module] for the provided timer implementations. Note that using the `"time"` feature
tracing-subscriber/src/fmt/format/mod.rs:733
↓ 11 callers
Method
check
(&self, actual: &ActualSpan, ctx: impl fmt::Display, subscriber_name: &str)
tracing-mock/src/span.rs:803
↓ 11 callers
Method
id
(&self)
tracing-subscriber/src/filter/layer_filters/mod.rs:632
↓ 11 callers
Function
is_contextual_root
Convenience function that returns [`ExpectedAncestry::IsContextualRoot`].
tracing-mock/src/expect.rs:267
↓ 11 callers
Method
module_path
Returns the path to the Rust module where the span occurred, or `None` if the module path is unknown.
tracing-core/src/metadata.rs:301
↓ 11 callers
Method
record_debug
(&mut self, field: &Field, value: &dyn fmt::Debug)
tracing-core/src/field.rs:420
↓ 11 callers
Function
retry_read_one_line_from_journal
Read exactly one line from journal for the given test name. Try to read lines for `testname` from journal, and `retry()` if the wasn't _exactly_ one
tracing-journald/tests/journal.rs:154
↓ 11 callers
Method
try_init
Install this Subscriber as the global default if one is not already set. If the `tracing-log` feature is enabled, this will also install the LogTrace
tracing-subscriber/src/fmt/mod.rs:503
↓ 11 callers
Method
with_ansi
TODO(eliza): consider making this a public API?
tracing-subscriber/src/fmt/format/mod.rs:450
↓ 10 callers
Method
as_str
Returns the string representation of the `Level`. This returns the same string as the `fmt::Display` implementation.
tracing-core/src/metadata.rs:534
↓ 10 callers
Method
clone
(&self)
tracing-subscriber/src/filter/layer_filters/combinator.rs:181
↓ 10 callers
Method
ctx
(&self)
tracing-subscriber/src/layer/layered.rs:406
↓ 10 callers
Method
filter
(&self)
tracing-subscriber/src/filter/env/field.rs:499
↓ 10 callers
Method
flatten_event
If set to `true` event metadata will be flattened into the root object.
tracing-subscriber/src/fmt/format/json.rs:100
↓ 10 callers
Method
record
(&self, span: &span::Id, values: &span::Record<'_>)
tracing-subscriber/src/fmt/mod.rs:395
↓ 10 callers
Method
scope
Returns an iterator over all parents of this span, starting with this span, ordered from leaf to root. The iterator will first return the span, then
tracing-subscriber/src/registry/mod.rs:463
↓ 10 callers
Function
set_global_default
Sets this subscriber as the global default for the duration of the entire program. Will be used as a fallback if no thread-local subscriber has been s
tracing/src/subscriber.rs:38
↓ 10 callers
Function
subscriber
()
tracing-subscriber/src/fmt/format/json.rs:567
↓ 10 callers
Method
with
Wraps `self` with the provided `layer`.
tracing-subscriber/src/layer/mod.rs:1502
↓ 10 callers
Method
with_current_span
If set to `false`, formatted events won't contain a field for the current span.
tracing-subscriber/src/fmt/format/json.rs:105
↓ 10 callers
Method
with_filter
Filter the traces evaluated by the `MockSubscriber`. The filter will be applied to all traces received before any validation occurs - so its position
tracing-mock/src/subscriber.rs:913
↓ 10 callers
Method
with_span_list
If set to `false`, formatted events won't contain a list of all currently entered spans. Spans are logged in a list from root to leaf.
tracing-subscriber/src/fmt/format/json.rs:111
↓ 10 callers
Method
with_timer
Use the given [`timer`] for span and event timestamps. See the [`time` module] for the provided timer implementations. Note that using the `"time`""
tracing-subscriber/src/fmt/fmt_layer.rs:433
↓ 9 callers
Method
enter
(&self, span: Id)
examples/examples/sloggish/sloggish_subscriber.rs:53
↓ 9 callers
Method
finish
Completes the builder, returning the configured `NonBlocking`.
tracing-appender/src/non_blocking.rs:218
↓ 9 callers
Method
into_iter
(self)
tracing-subscriber/src/filter/targets.rs:476
↓ 9 callers
Function
lock_for_test
()
tracing-log/src/interest_cache.rs:236
↓ 9 callers
Method
next
(&mut self)
tracing-subscriber/src/filter/targets.rs:547
↓ 9 callers
Function
sanitize_timings
(s: String)
tracing-subscriber/src/fmt/fmt_layer.rs:1358
↓ 9 callers
Method
set
(self, FilterId(mask): FilterId, enabled: bool)
tracing-subscriber/src/filter/layer_filters/mod.rs:1046
↓ 9 callers
Function
try_cache
(metadata: &Metadata<'_>, callback: impl FnOnce() -> bool)
tracing-log/src/interest_cache.rs:161
↓ 9 callers
Method
with_level
Sets whether or not an event's level is displayed.
tracing-subscriber/src/fmt/fmt_layer.rs:541
↓ 9 callers
Method
with_writer
Sets the [`MakeWriter`] that the layer being built will use to write events. # Examples Using `stderr` rather than `stdout`: ```rust use std::io; u
tracing-subscriber/src/fmt/fmt_layer.rs:182
↓ 8 callers
Method
add_directive
Add a filtering directive to this `EnvFilter`. The added directive will be used in addition to any previously set directives, either added using this
tracing-subscriber/src/filter/env/mod.rs:477
↓ 8 callers
Method
clone
(&self)
examples/examples/tower-load.rs:194
↓ 8 callers
Function
expect_parse
(s: &str)
tracing-subscriber/src/filter/targets.rs:611
↓ 8 callers
Method
get_output
(&self)
tracing-subscriber/tests/ansi_escaping.rs:17
↓ 8 callers
Method
instrument
Instruments this type with the provided [`Span`], returning an `Instrumented` wrapper. The attached [`Span`] will be [entered] every time the instrum
tracing/src/instrument.rs:86
↓ 8 callers
Method
is_empty
Returns true if this set of `Attributes` contains _no_ values.
tracing-core/src/span.rs:195
↓ 8 callers
Method
metadata
The metadata for the actual span if it is available.
tracing-mock/src/span.rs:201
↓ 8 callers
Method
run
(&self)
tracing-subscriber/benches/support/mod.rs:43
↓ 8 callers
Function
set_global_default
Sets this dispatch as the global default for the duration of the entire program. Will be used as a fallback if no thread-local dispatch has been set i
tracing-core/src/dispatcher.rs:299
↓ 8 callers
Method
span
(&self, id: &Id)
tracing-subscriber/src/fmt/fmt_layer.rs:1154
↓ 8 callers
Function
with_journald
(f: impl FnOnce())
tracing-journald/tests/journal.rs:19
↓ 8 callers
Method
with_level
Sets whether or not an event's level is displayed.
tracing-subscriber/src/fmt/mod.rs:717
↓ 8 callers
Method
with_min_verbosity
Sets the minimum logging verbosity for which the cache will apply. The interest for logs with a lower verbosity than specified here will not be cache
tracing-log/src/interest_cache.rs:48
↓ 8 callers
Method
write_all
(&mut self, buf: &[u8])
tracing-appender/src/non_blocking.rs:259
↓ 7 callers
Method
as_ref
(&self)
tracing-attributes/src/lib.rs:648
↓ 7 callers
Method
bad
(&self, name: impl AsRef<str>, what: fmt::Arguments<'_>)
tracing-mock/src/expect.rs:289
↓ 7 callers
Method
event_format
Sets the [event formatter][`FormatEvent`] that the subscriber being built will use to format events that occur. The event formatter may be any type i
tracing-subscriber/src/fmt/mod.rs:1031
↓ 7 callers
Method
extensions
(&self)
tracing-subscriber/src/registry/mod.rs:479
↓ 7 callers
Method
extensions_mut
(&self)
tracing-subscriber/src/registry/mod.rs:489
↓ 7 callers
Function
filter_as_usize
(x: &Option<Level>)
tracing-core/src/metadata.rs:980
↓ 7 callers
Method
finish
(self)
tracing-mock/src/field.rs:567
↓ 7 callers
Method
finish
(self)
tracing-subscriber/src/fmt/format/json.rs:459
↓ 7 callers
Method
get
(&self, id: &Id)
tracing-subscriber/src/registry/sharded.rs:184
↓ 7 callers
Function
layer
Construct a journald layer Fails if the journald socket couldn't be opened.
tracing-journald/src/lib.rs:296
↓ 7 callers
Method
metadata
Returns this span's `Metadata`, if it is enabled.
tracing/src/span.rs:1339
↓ 7 callers
Method
read
(&self)
tracing-appender/src/sync.rs:40
↓ 7 callers
Function
set_default
(subscriber: S)
tracing/src/subscriber.rs:57
↓ 7 callers
Function
set_global_default
(format: LogFormat)
examples/examples/futures-proxy-server.rs:129
↓ 7 callers
Method
span
(&self, id: &span::Id)
tracing-subscriber/src/layer/context.rs:211
↓ 7 callers
Method
span_and_inner_pin_mut
Get a mutable reference to the [`Span`] a pinned mutable reference to the wrapped type.
tracing-futures/src/lib.rs:284
↓ 7 callers
Function
test_json
( expected: &str, builder: crate::fmt::SubscriberBuilder<JsonFields, Format<Json>>, pr
tracing-subscriber/src/fmt/format/json.rs:847
↓ 7 callers
Method
try_lock
Tries to lock the mutex. If it is already locked, it will return None. Otherwise it returns a guard within Some.
tracing-core/src/spin/mutex.rs:67
↓ 7 callers
Method
wait
Like try, but will spin if the `Once` is in the process of being initialized
tracing-core/src/spin/once.rs:131
↓ 7 callers
Method
with_default
Sets the default level to enable for spans and events whose targets did not match any of the configured prefixes. By default, this is [`LevelFilter::
tracing-subscriber/src/filter/targets.rs:274
↓ 7 callers
Method
with_dispatch
Wrap a future, stream, sink or executor with the same subscriber as this WithDispatch.
tracing-futures/src/lib.rs:541
↓ 7 callers
Method
with_level
Sets whether or not an event's level is displayed.
tracing-subscriber/src/fmt/format/mod.rs:781
↓ 6 callers
Method
as_writer
Returns a new [`format::Writer`] for writing to this `FormattedFields`. The returned [`format::Writer`] can be used with the [`FormatFields::format_f
tracing-subscriber/src/fmt/fmt_layer.rs:818
↓ 6 callers
Method
assert_logged
(&self, expected: &str)
tracing/test-log-support/src/lib.rs:67
↓ 6 callers
Method
compact
Use a less verbose output format. See [`Compact`].
tracing-subscriber/src/fmt/format/mod.rs:634
↓ 6 callers
Method
compare_or_panic
( &mut self, name: &str, value: &dyn Value, ctx: &str, subscriber_name
tracing-mock/src/field.rs:465
↓ 6 callers
Method
contains
Check whether or not a certain flag is set for this [`FmtSpan`]
tracing-subscriber/src/fmt/format/mod.rs:1665
↓ 6 callers
Method
fields
Returns a list of [fields] defined by the span. [fields]: tracing_core::field
tracing-subscriber/src/registry/mod.rs:358
↓ 6 callers
Method
get_mut
(&mut self)
tracing-appender/src/sync.rs:35
↓ 6 callers
Function
init
Install a global tracing subscriber that listens for events and filters based on the value of the [`RUST_LOG` environment variable]. The configuratio
tracing-subscriber/src/fmt/mod.rs:1262
↓ 6 callers
Method
json
( self, )
tracing-subscriber/src/fmt/mod.rs:785
↓ 6 callers
Method
metadata
Returns a reference to the new span's metadata.
tracing-core/src/span.rs:143
↓ 6 callers
Function
my_fn
((arg1, arg2): (usize, usize))
tracing-attributes/tests/destructuring.rs:8
↓ 6 callers
Method
new_span
(&self, _: &Attributes<'_>)
tracing-subscriber/tests/reload.rs:24
↓ 6 callers
Method
parent
Returns a `SpanRef` describing this span's parent, or `None` if this span is the root of its trace tree.
tracing-subscriber/src/registry/mod.rs:364
↓ 6 callers
Method
pop
(&mut self, expected_id: &Id)
tracing-subscriber/src/registry/stack.rs:27
↓ 6 callers
Method
record
(&self, key: &crate::field::Field, visitor: &mut dyn crate::field::Visit)
tracing-core/src/field.rs:564
↓ 6 callers
Method
record
(&self, _: &Id, _: &Record<'_>)
tracing/tests/subscriber.rs:39
↓ 6 callers
Method
set
(&self, span_id: u64)
tracing-mock/src/span.rs:989
↓ 6 callers
Method
thread
(&self, f: impl FnOnce() + Send + 'static)
tracing-subscriber/benches/support/mod.rs:24
↓ 6 callers
Method
with_max_level
Sets the maximum [verbosity level] that will be enabled by the subscriber. If the max level has already been set, or a [`EnvFilter`] was added by [`w
tracing-subscriber/src/fmt/mod.rs:1000
↓ 6 callers
Method
with_span_events
Configures how synthesized events are emitted at points in the [span lifecycle][lifecycle]. The following options are available: - `FmtSpan::NONE`:
tracing-subscriber/src/fmt/fmt_layer.rs:501
↓ 6 callers
Method
write_char
(&mut self, c: char)
tracing-subscriber/src/fmt/format/mod.rs:515
↓ 6 callers
Method
write_str
(&mut self, s: &str)
tracing-subscriber/src/fmt/format/mod.rs:493
↓ 5 callers
Method
buf
(&self)
tracing-subscriber/src/fmt/mod.rs:1300
↓ 5 callers
Method
clear
(&mut self)
tracing-subscriber/src/registry/extensions.rs:185
↓ 5 callers
Method
clone_span
(&self, id: &span::Id)
tracing-core/src/dispatcher.rs:651
← previous
next →
101–200 of 2,480, ranked by callers