KodrAus
adb7b53e29
run fmt
2024-03-20 08:13:24 +10:00
KodrAus
6c2dade605
add some clarifications to the library docs
2024-03-20 08:11:55 +10:00
KodrAus
6153cb289f
prepare for 0.4.21 release
2024-02-27 20:21:12 +10:00
KodrAus
2b220bf3b7
clean up structured logging example
2024-02-20 07:36:07 +10:00
KodrAus
ad917118a5
support field shorthand in macros
2024-02-19 07:36:01 +10:00
KodrAus
52460f9928
stabilize the kv features
2024-02-16 15:40:52 +10:00
KodrAus
d8dc6a834b
rename source::Visitor to VisitSource and value::Visitor to VisitValue
2024-02-13 20:30:05 +10:00
KodrAus
0374a25554
work on macro support for capturing
2024-02-13 20:07:58 +10:00
KodrAus
fdc1c6e0b8
rename value::Visit to value::Visitor
2024-01-29 08:20:39 +10:00
AngelicosPhosphoros
7cb6a01dff
Use Acquire
ordering for initialization check
...
Reasoning is provided in the code comment.
2024-01-10 10:49:04 +01:00
AngelicosPhosphoros
c5ddd6fbe1
Remove ok_or
in favor of Option::ok_or
...
Usages of `Option::ok_or` were removed because it was unstable at the time.
It is now stable of MSRV.
2023-12-17 22:21:36 +01:00
Ashley Mannix
cc2a3e0edf
Merge pull request #577 from nyurik/fmt-docs
...
Update docs to 2021 edition, test
2023-11-20 09:25:50 +10:00
Ashley Mannix
b7c4f6f951
Merge pull request #594 from ptosi/max-levels
...
Clarify documentation and simplify initialization of `STATIC_MAX_LEVEL`
2023-11-20 09:25:31 +10:00
Sebastian Wiesner
abb14d4485
Add logcontrol-log and log-reload
...
logcontrol-log provides a log adaptor for the systemd logcontrol
interface which enables on-the-fly reconfiguration of logging over
DBus.
log-reload is a utility crate providing a log implementation that can
dynamically modify and replace an underlying logger. It backs the
logcontrol-log implementation.
2023-10-26 16:38:03 +02:00
Yuri Astrakhan
6403cea1a9
rm editions, add changelog
2023-10-21 17:36:19 -04:00
Yuri Astrakhan
3237ff77f8
Update docs to 2021 edition, test
...
* Inline format arg in documentation and a few call places
* Add a unit test for inlined format args
I was surprised to discover that log crate has no edition value... Any reason to keep it at 2015?
2023-10-21 17:36:19 -04:00
Pierre-Clément Tosi
05d8c46c60
Remove intermediate MAX_LEVEL_INNER
...
Drop the constant as it now seems unnecessary.
Note: this is done in a separate commit to be easy to bisect and revert.
2023-10-20 16:59:38 +01:00
Pierre-Clément Tosi
296fa1a4de
Simplify STATIC_MAX_LEVEL intialization
...
Replace get_max_level_inner() with cfg!() and a const-compatible match,
now that the MSRV has been bumped to 1.60.0.
2023-10-20 16:59:38 +01:00
Pierre-Clément Tosi
cc7efd8f12
Add feature-dependent tests for STATIC_MAX_LEVEL
...
Add unit tests that check, for the current configuration of the crate
features, that STATIC_MAX_LEVEL has the appropriate value. As the
features are statically set (at build time), coverage of all the
max_level_* and release_max_level_* value pairs must be achieved by
launching cargo with different sets:
levels="off debug error info trace warn"
for i in '' $levels; do
release=${i:+--features=release_max_level_${i}}
for j in '' $levels; do
debug=${j:+--features=max_level_${j}}
cargo test static_max_level ${release} ${debug}
cargo test static_max_level ${release} ${debug} --release
done
done
2023-10-20 16:59:38 +01:00
Pierre-Clément Tosi
fa8ff872a1
Clarify release builds using max_level_* features
...
Rephrase the documentation to make it clear that the max_level_* and
release_max_level_* are not separate ways of setting STATIC_MAX_LEVEL
for respectively debug and release builds but instead, that max_level_*
are used by all builds and that release_max_level_* are just a way to
override them.
2023-10-20 16:59:38 +01:00
Michael Diamond
b912f79e81
Fix typo in file_static() method doc
2023-09-30 12:27:42 -07:00
Yuri Astrakhan
31b683d49f
Set all crates to 2021 edition
2023-08-20 21:28:46 -04:00
Yuri Astrakhan
32d440a968
Minor clippy nits
...
* Fix semicolons (pedantic)
* Don't duplicate var name for instantiation if not needed
* Use `mar_or` instead of `map.unwrap_or`
2023-08-20 02:26:44 -04:00
Ashley Mannix
4708f1484c
Merge pull request #574 from chrysn-pull-requests/doc-log-to-defmt
...
doc: Add log-to-defmt to other-facilities section
2023-08-12 20:21:38 +10:00
Ashley Mannix
6de3cccc36
Merge pull request #571 from rust-lang/cargo/0.4.20
...
Prepare for 0.4.20 release
2023-08-12 20:21:28 +10:00
EFanZh
3f534d00e4
Move private APIs into a single module
2023-08-06 18:50:48 +08:00
chrysn
f5ab686e9b
doc: Add log-to-defmt to other-facilities section
2023-07-27 13:45:18 +02:00
KodrAus
6d173bf941
prepare for 0.4.20 release
2023-07-11 10:07:57 +10:00
EFanZh
9d052b17d3
Remove local_inner_macros
usage
2023-07-11 00:05:28 +08:00
Ashley Mannix
84ddc30ecc
Merge pull request #552 from rust-lang/cargo/0.4.18
...
Prepare for 0.4.19 release
2023-06-11 11:41:08 +10:00
0xZensh
db9e5cc214
Add the structured-logger crate to the README
...
Signed-off-by: Yan Qing <txr1883@gmail.com>
2023-05-29 09:25:28 +08:00
KodrAus
92e83c04f3
fixes for unrevert
2023-05-28 14:24:22 +10:00
KodrAus
54d48fb53e
prepare for 0.4.19 release
2023-05-28 14:23:09 +10:00
KodrAus
3c8473d9ed
Revert "Revert "Remove build.rs file""
...
This reverts commit 4e689bbb8f7dc7c465e6367b7022f347a0fe09e9.
2023-05-28 14:21:06 +10:00
KodrAus
d062c83c4c
prepare for 0.4.18 release
2023-05-28 14:01:27 +10:00
KodrAus
4e689bbb8f
Revert "Remove build.rs file"
...
This reverts commit 7f09d72e5fd5387c672b9803ead6548b45920f55.
2023-05-28 13:51:16 +10:00
OccupyMars2025
1acf2f355b
src/lib.rs : prefix an unused variable with an underscore
...
unused variable: `metadata`, according to rustc,
if this is intentional, prefix it with an underscore: `_metadata`
2023-05-26 17:02:20 +08:00
KodrAus
ce9f217d58
use target_has_atomic instead of the old atomic_cas cfg
2023-04-13 17:08:08 +10:00
Ashley Mannix
11eda98db8
Merge pull request #544 from djkoloski/add_set_max_level_racy
...
Add `set_max_level_racy` and gate `set_max_level`
2023-04-13 13:53:44 +10:00
Ashley Mannix
474699a6a8
Merge pull request #543 from GuillaumeGomez/rm-build-rs
...
Remove build.rs file
2023-04-11 07:46:56 +10:00
a1ecbr0wn
2045d335c7
Add call_logger to the documentation
2023-03-07 10:13:41 +00:00
David Koloski
e5f1ae9703
Add set_max_level_racy
and gate set_max_level
...
Calling `set_max_level` can result in a race condition on platforms that
don't have an atomic compare and swap implementation. This gates
`set_max_level` behind `#[cfg(atomic_cas)]` and adds a racy alternative
that can be called in these situations. This mirrors the approach for
`set_logger`.
2023-01-06 11:28:47 -05:00
Guillaume Gomez
7f09d72e5f
Remove build.rs file
2023-01-06 16:28:51 +01:00
ErikWDev
969281ea14
Ensure removal of cfg_if is compatible with MSRV
2022-11-26 18:21:06 +01:00
ErikWDev
2cf735473a
Remove dependency on cfg_if
2022-11-26 16:57:36 +01:00
Ashley Mannix
63d7747386
Merge pull request #519 from glandium/eq_ignore_ascii_case
...
Replace ad-hoc eq_ignore_ascii_case with slice::eq_ignore_ascii_case
2022-06-16 09:13:45 +10:00
Mike Hommey
975d38a75a
Replace ad-hoc eq_ignore_ascii_case with slice::eq_ignore_ascii_case
...
The latter has been available since rust 1.23.0.
2022-06-09 08:50:25 +09:00
Ashley Mannix
d9f0939a9e
Merge branch 'master' into clippy_lints
2022-06-03 08:59:27 +10:00
Marcel Hellwig
4b52024d74
apply clippy lints
2022-05-31 14:22:36 +02:00
Marcel Hellwig
cc6e9caf25
fix markdown links (again)
2022-05-30 16:11:12 +02:00