dir-odt-to-pdf/Cargo.toml
Jesús Pérex 13c65980ac refactor(logging): Improve thread safety and test configuration
This commit enhances the logging system with better thread safety and proper test configuration:

- Replace RefCell with RwLock in SimpleLogger for thread-safe logging
- Add proper feature flag configuration for test-sync
- Organize logging modules with clear separation between prod and test
- Update test files with proper feature flag annotations
- Fix module structure in lib.rs to avoid duplicate definitions

Technical changes:
- Use RwLock for thread-safe log writer access
- Add #![cfg(feature = "test-sync")] to all test files
- Configure .cargo/config.toml for test-sync feature
- Update Cargo.toml with proper test configurations
- Clean up logging module exports

This change ensures thread-safe logging in production while maintaining
separate test-specific synchronization primitives, improving overall
reliability and maintainability.
2025-05-27 09:57:16 +01:00

41 lines
855 B
TOML

[package]
name = "dir-odt-to-pdf"
version = "0.1.0"
description = "Convert source directory with odt files to target path with pdf files"
authors = ["Jesús Pérez <jpl@jesusperez.pro>"]
edition = "2024"
[features]
default = []
test-sync = [] # Feature flag for test synchronization primitives
[dependencies]
clap = { version = "4.5.38", features = ["derive"] }
which = "7.0.3"
log = "0.4"
env_logger = "0.11.8"
thiserror = "2.0.12"
tempfile = "3.8"
chrono = "0.4"
structopt = "0.3"
[dev-dependencies]
serial_test = "3.2.0"
tempfile = "3.8"
[[test]]
name = "logging_writer_tests"
required-features = ["test-sync"]
[[test]]
name = "test_init_logging_append_mode"
required-features = ["test-sync"]
[[test]]
name = "test_different_log_levels"
required-features = ["test-sync"]
[[test]]
name = "test_log_timed_macro"
required-features = ["test-sync"]