Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eas/hierarchecal #15

Merged
merged 23 commits into from
Nov 28, 2023
Merged
29 changes: 0 additions & 29 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,2 @@
[net]
git-fetch-with-cli = true

[target.'cfg(all())']
rustflags = [
"-Wclippy::all", # correctness, sus, style, complexity, perf
"-Wclippy::pedantic",
"-Wclippy::cargo",
"-Wclippy::restriction",
"-Aclippy::missing_docs_in_private_items", # pub docs should be fine
"-Aclippy::as_conversions", # not-recommended, covered by other lints
"-Aclippy::missing_inline_in_public_items", # we're using lto, so obviated
"-Aclippy::cargo_common_metadata", # these are internal crates
"-Aclippy::exhaustive_structs", # ..
"-Aclippy::exhaustive_enums", # ..
"-Aclippy::implicit_return", # non-std style
"-Aclippy::else-if-without-else", # ..
"-Aclippy::self-named-module-files", # ..
"-Aclippy::default_trait_access", # ..
"-Aclippy::pattern_type_mismatch", # ..
"-Aclippy::mod_module_files", # ..
"-Aclippy::if_then_some_else_none", # ..
"-Aclippy::str_to_string", # rustc suggests `.to_string()`, so non-std style
"-Aclippy::shadow_reuse", # I feel this can actually be great
"-Aclippy::multiple_crate_versions", # This isnt something we have much control over
"-Aclippy::must_use_candidate", # really noisy
"-Aclippy::default_numeric_fallback", # should be allowed with '0'.
"-Aclippy::module_name_repetitions", # I found this impractical
"-Aclippy::implicit_hasher", # Adds a lot of complication only a bit of generalization
"-Aclippy::pub_use",
]
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"cSpell.words": [
"appender",
"appenders",
"fmtorp",
"messageonly"
"fmtr",
"hmap",
"Lyrd",
"messageonly",
"targ"
]
}
67 changes: 67 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,69 @@
[workspace]
resolver = "1"
members = ["trace4rs", "trace4rs-config", "trace4rs-fmtorp"]

[workspace.package]
version = "0.5.1"
authors = [
"Evan Simmons <evan.simmons@imperva.com>",
"Everett Pompeii <everett.pompeii@imperva.com>",
"Richard Meester <richard.meester@imperva.com>",
]
edition = "2021"
license = "MIT"
keywords = ["tracing", "logging", "log4rs"]
repository = "https://github.com/imperva/trace4rs"
readme = "readme.md"
categories = ["development-tools"]

[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3

[workspace.lints.clippy]
all = "warn" # correctness, sus, style, complexity, perf
pedantic = "warn"
cargo = "warn"
assertions_on_result_states = "warn"
arithmetic_side_effects = "warn"
create_dir = "warn"
deref_by_slicing = "warn"
empty_drop = "warn"
empty_structs_with_brackets = "warn"
filetype_is_file = "warn"
format_push_string = "warn"
indexing_slicing = "warn"
lossy_float_literal = "warn"
mem_forget = "warn" # Use ManuallyDrop
missing_assert_message = "warn"
missing_asserts_for_indexing = "warn"
multiple_inherent_impl = "warn"
mutex_atomic = "warn"
needless_raw_strings = "warn"
panic_in_result_fn = "warn"
partial_pub_fields = "warn"
pub_without_shorthand = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
self_named_module_files = "warn"
semicolon_outside_block = "warn"
shadow_unrelated = "warn"
string_lit_chars_any = "warn"
string_slice = "warn"
tests_outside_test_module = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_self_imports = "warn"
unneeded_field_pattern = "warn"
unseparated_literal_suffix = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
verbose_file_reads = "warn"

# Enable when stabilized
# allow_attributes = "warn"
# allow_attributes_without_reason = "warn"

# Unsure of
# absolute_paths = "warn"
5 changes: 5 additions & 0 deletions README.md → readme.md
Original file line number Diff line number Diff line change
@@ -14,3 +14,8 @@ The takeaway is that the actual appenders are roughly equivalent in
performance. However, when using the `tracing` macros vs the `log` macros
the appender performance is roughly 2 orders of magnitude larger.
See for yourself with `cargo bench --features tracing-macros`


## Todo

- add an example for metrics functionality in lieu of a pub method
3 changes: 1 addition & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[toolchain]
channel = "nightly-2022-06-25"
profile = "default"
channel = "stable"
17 changes: 11 additions & 6 deletions trace4rs-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[package]
name = "trace4rs-config"
version = "0.5.1"
edition = "2021"
description = "trace4rs configuration"
keywords = ["tracing", "logging", "log4rs"]
authors = ["Evan Simmons", "Everett Pompeii", "Richard Meester"]
license = "MIT"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
keywords.workspace = true
repository.workspace = true
readme.workspace = true
categories.workspace = true

[lints]
workspace = true

[features]
in-order-serialization = ["serde"]
@@ -14,7 +20,6 @@ in-order-serialization = ["serde"]
literally = "0.1.3"
schemars = { version = "0.8.3", optional = true }
serde = { version = "1.0.130", optional = true, features = ["derive"] }
smart-default = "0.6.0"
thiserror = "1.0.29"
tracing = "0.1.0"

Loading