1[workspace]
2resolver = "2"
3members = ["crates/*"]
4
5[workspace.package]
6repository = "https://github.com/rust-cli/env_logger"
7license = "MIT OR Apache-2.0"
8edition = "2021"
9rust-version = "1.71" # MSRV
10include = [
11 "build.rs",
12 "src/**/*",
13 "Cargo.toml",
14 "Cargo.lock",
15 "LICENSE*",
16 "README.md",
17 "benches/**/*",
18 "examples/**/*",
19 "tests/**/*",
20]
21
22[workspace.lints.rust]
23rust_2018_idioms = { level = "warn", priority = -1 }
24unreachable_pub = "warn"
25unsafe_op_in_unsafe_fn = "warn"
26unused_lifetimes = "warn"
27unused_macro_rules = "warn"
28unused_qualifications = "warn"
29
30[workspace.lints.clippy]
31bool_assert_comparison = "allow"
32branches_sharing_code = "allow"
33checked_conversions = "warn"
34collapsible_else_if = "allow"
35create_dir = "warn"
36dbg_macro = "warn"
37debug_assert_with_mut_call = "warn"
38doc_markdown = "warn"
39empty_enum = "warn"
40enum_glob_use = "warn"
41expl_impl_clone_on_copy = "warn"
42explicit_deref_methods = "warn"
43explicit_into_iter_loop = "warn"
44fallible_impl_from = "warn"
45filter_map_next = "warn"
46flat_map_option = "warn"
47float_cmp_const = "warn"
48fn_params_excessive_bools = "warn"
49from_iter_instead_of_collect = "warn"
50if_same_then_else = "allow"
51implicit_clone = "warn"
52imprecise_flops = "warn"
53inconsistent_struct_constructor = "warn"
54inefficient_to_string = "warn"
55infinite_loop = "warn"
56invalid_upcast_comparisons = "warn"
57large_digit_groups = "warn"
58large_stack_arrays = "warn"
59large_types_passed_by_value = "warn"
60let_and_return = "allow" # sometimes good to name what you are returning
61linkedlist = "warn"
62lossy_float_literal = "warn"
63macro_use_imports = "warn"
64mem_forget = "warn"
65mutex_integer = "warn"
66needless_continue = "warn"
67needless_for_each = "warn"
68negative_feature_names = "warn"
69path_buf_push_overwrite = "warn"
70ptr_as_ptr = "warn"
71rc_mutex = "warn"
72redundant_feature_names = "warn"
73ref_option_ref = "warn"
74rest_pat_in_fully_bound_structs = "warn"
75result_large_err = "allow"
76same_functions_in_if_condition = "warn"
77self_named_module_files = "warn"
78semicolon_if_nothing_returned = "warn"
79str_to_string = "warn"
80string_add = "warn"
81string_add_assign = "warn"
82string_lit_as_bytes = "warn"
83string_to_string = "warn"
84todo = "warn"
85trait_duplication_in_bounds = "warn"
86uninlined_format_args = "warn"
87verbose_file_reads = "warn"
88wildcard_imports = "warn"
89zero_sized_map_values = "warn"
90
91[package]
92name = "env_logger"
93version = "0.11.8"
94description = """
95A logging implementation for `log` which is configured via an environment
96variable.
97"""
98categories = ["development-tools::debugging"]
99keywords = ["logging", "log", "logger"]
100repository.workspace = true
101license.workspace = true
102edition.workspace = true
103rust-version.workspace = true
104include.workspace = true
105
106[package.metadata.docs.rs]
107all-features = true
108rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
109
110[package.metadata.release]
111pre-release-replacements = [
112 {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
113 {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
114 {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
115 {file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
116 {file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/rust-cli/env_logger/compare/{{tag_name}}...HEAD", exactly=1},
117]
118
119[features]
120default = ["auto-color", "humantime", "regex"]
121color = ["dep:anstream", "dep:anstyle"]
122auto-color = ["color", "anstream/auto"]
123humantime = ["dep:jiff"]
124regex = ["env_filter/regex"]
125kv = ["log/kv"]
126# Deprecated
127unstable-kv = ["kv"]
128
129[dependencies]
130log = { version = "0.4.21", features = ["std"] }
131env_filter = { version = "0.1.0", path = "crates/env_filter", default-features = false }
132jiff = { version = "0.2.3", default-features = false, features = ["std"], optional = true }
133anstream = { version = "0.6.11", default-features = false, features = ["wincon"], optional = true }
134anstyle = { version = "1.0.6", optional = true }
135
136[[test]]
137name = "regexp_filter"
138harness = false
139
140[[test]]
141name = "log-in-log"
142harness = false
143
144[[test]]
145name = "log_tls_dtors"
146harness = false
147
148[[test]]
149name = "init-twice-retains-filter"
150harness = false
151
152[lints]
153workspace = true
154