-
Notifications
You must be signed in to change notification settings - Fork 7
/
Cargo.toml
119 lines (104 loc) · 3.24 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright 2024 FastLabs Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[package]
name = "logforth"
description = "A versatile and extensible logging implementation."
edition = "2021"
homepage = "https://github.com/fast/logforth"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/fast/logforth"
rust-version = "1.75.0"
version = "0.19.1"
categories = ["development-tools::debugging"]
keywords = ["logging", "log", "opentelemetry", "fastrace"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[features]
fastrace = ["dep:fastrace"]
journald = ["dep:libc"]
json = ["dep:serde_json", "dep:serde", "jiff/serde"]
native-tls = ["dep:native-tls", "fasyslog?/native-tls"]
no-color = ["colored/no-color"]
non-blocking = ["dep:crossbeam-channel"]
opentelemetry = [
"dep:opentelemetry",
"dep:opentelemetry-otlp",
"dep:opentelemetry_sdk",
]
rolling-file = ["non-blocking"]
syslog = ["non-blocking", "dep:fasyslog"]
[dependencies]
anyhow = { version = "1.0" }
colored = { version = "2.1" }
env_filter = { version = "0.1" }
jiff = { version = "0.1.14" }
log = { version = "0.4", features = ["std", "kv"] }
# Optional dependencies
crossbeam-channel = { version = "0.5", optional = true }
fastrace = { version = "0.7", optional = true }
fasyslog = { version = "0.3", optional = true }
libc = { version = "0.2.162", optional = true }
native-tls = { version = "0.2", optional = true }
opentelemetry = { version = "0.27", features = ["logs"], optional = true }
opentelemetry-otlp = { version = "0.27", features = [
"logs",
"grpc-tonic",
"http-json",
"http-proto",
], optional = true }
opentelemetry_sdk = { version = "0.27", features = [
"logs",
"rt-tokio",
], optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
[dev-dependencies]
rand = "0.8"
tempfile = "3.13"
tokio = { version = "1", features = ["rt-multi-thread"] }
## Examples
[[example]]
doc-scrape-examples = true
name = "simple_stdout"
path = "examples/simple_stdout.rs"
[[example]]
doc-scrape-examples = true
name = "json_stdout"
path = "examples/json_stdout.rs"
required-features = ["json"]
[[example]]
doc-scrape-examples = true
name = "multiple_dispatches"
path = "examples/multiple_dispatches.rs"
[[example]]
doc-scrape-examples = true
name = "rolling_file"
path = "examples/rolling_file.rs"
required-features = ["rolling-file", "json"]
[[example]]
doc-scrape-examples = true
name = "custom_layout_filter"
path = "examples/custom_layout_filter.rs"
[[example]]
doc-scrape-examples = true
name = "syslog"
path = "examples/syslog.rs"
required-features = ["syslog"]
[[example]]
doc-scrape-examples = true
name = "journald"
path = "examples/journald.rs"
required-features = ["journald"]