mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
* net: switch from `log` to `tracing`. Motivation: The `tracing` crate implements scoped, structured, context-aware diagnostics, which can add significant debugging value over unstructured log messages. `tracing` is part of the Tokio project. As part of the `tokio` 0.2 changes, I thought it would be good to move over from `log` to `tracing` in the tokio runtime. Solution: This branch replaces the use of `log` in `tokio-net` with `tracing`. I've tried to leave all the instrumentation points more or less the same, but modified to use structured fields instead of string interpolation. Notes: I removed the timing in `Reactor::poll` in favor of simply adding a `#[tracing::instrument]` attribute. Since the generated `tracing` span will have enter and exit events, a `tracing::Subscriber` implemementation can use those to record timestamps, and process that timing data in a much more sophisticated manner than including it in a log line. We can add the timestamps back if they're desired. Signed-off-by: Eliza Weisman <[email protected]>
121 lines
2.9 KiB
TOML
121 lines
2.9 KiB
TOML
[package]
|
|
name = "tokio-net"
|
|
# When releasing to crates.io:
|
|
# - Remove path dependencies
|
|
# - Update html_root_url.
|
|
# - Update doc url
|
|
# - Cargo.toml
|
|
# - Update CHANGELOG.md.
|
|
# - Create "v0.2.x" git tag.
|
|
version = "0.2.0-alpha.2"
|
|
edition = "2018"
|
|
authors = ["Tokio Contributors <[email protected]>"]
|
|
license = "MIT"
|
|
readme = "README.md"
|
|
repository = "https://github.com/tokio-rs/tokio"
|
|
homepage = "https://tokio.rs"
|
|
documentation = "https://docs.rs/tokio-net/0.2.0-alpha.2/tokio_net"
|
|
description = """
|
|
Event loop that drives Tokio I/O resources.
|
|
"""
|
|
categories = ["asynchronous", "network-programming"]
|
|
|
|
[features]
|
|
async-traits = []
|
|
process = [
|
|
"crossbeam-queue",
|
|
"futures-util-preview",
|
|
"libc",
|
|
"mio-named-pipes",
|
|
"signal",
|
|
"winapi/handleapi",
|
|
"winapi/winerror",
|
|
"winapi/minwindef",
|
|
"winapi/processthreadsapi",
|
|
"winapi/synchapi",
|
|
"winapi/threadpoollegacyapiset",
|
|
"winapi/winbase",
|
|
"winapi/winnt",
|
|
]
|
|
signal = [
|
|
"futures-util-preview",
|
|
"mio-uds",
|
|
"libc",
|
|
"signal-hook-registry",
|
|
"winapi/consoleapi",
|
|
"winapi/minwindef",
|
|
"winapi/wincon"
|
|
]
|
|
tcp = [
|
|
"bytes",
|
|
"futures-util-preview",
|
|
"iovec",
|
|
]
|
|
udp = [
|
|
"bytes",
|
|
"futures-sink-preview",
|
|
"futures-util-preview",
|
|
]
|
|
uds = [
|
|
"bytes",
|
|
"mio-uds",
|
|
"futures-util-preview",
|
|
"iovec",
|
|
"libc",
|
|
]
|
|
log = ["tracing/log"]
|
|
|
|
[dependencies]
|
|
tokio-codec = { version = "=0.2.0-alpha.2", path = "../tokio-codec" }
|
|
tokio-executor = { version = "=0.2.0-alpha.2", path = "../tokio-executor" }
|
|
tokio-io = { version = "=0.2.0-alpha.2", path = "../tokio-io" }
|
|
tokio-sync = { version = "=0.2.0-alpha.2", path = "../tokio-sync" }
|
|
|
|
tracing = { version = "0.1.5", optional = true }
|
|
|
|
# driver implementation
|
|
crossbeam-utils = "0.6.0"
|
|
futures-core-preview = "=0.3.0-alpha.18"
|
|
lazy_static = "1.0.2"
|
|
mio = "0.6.14"
|
|
num_cpus = "1.8.0"
|
|
parking_lot = "0.9"
|
|
slab = "0.4.0"
|
|
|
|
# TCP / UDP
|
|
bytes = { version = "0.4", optional = true }
|
|
futures-sink-preview = { version = "=0.3.0-alpha.18", optional = true }
|
|
futures-util-preview = { version = "=0.3.0-alpha.18", optional = true }
|
|
iovec = { version = "0.1", optional = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
# UDS / Signal
|
|
crossbeam-queue = { version = "0.1.2", optional = true }
|
|
mio-uds = { version = "0.6.5", optional = true }
|
|
libc = { version = "0.2.42", optional = true }
|
|
signal-hook-registry = { version = "~1", optional = true }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
mio-named-pipes = { version = "0.1", optional = true }
|
|
|
|
[target.'cfg(windows)'.dependencies.winapi]
|
|
version = "0.3"
|
|
default-features = false
|
|
optional = true
|
|
|
|
[target.'cfg(test)'.dependencies]
|
|
tracing = { version = "0.1.5", features = ["log"] }
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "0.2.0-alpha.1", path = "../tokio" }
|
|
tokio-test = { version = "0.2.0-alpha.1", path = "../tokio-test" }
|
|
num_cpus = "1.8.0"
|
|
tokio-io-pool = "0.1.4"
|
|
|
|
# UDS tests
|
|
tempfile = "3"
|
|
futures-preview = "=0.3.0-alpha.18"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|