Skip to content

Commit 469ae72

Browse files
committed
Transform feature "ignore-logger-errors" to additive feature.
1 parent 22d6974 commit 469ae72

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
Now you can compare everything that is `AsRef<str>` (such as `String` and `str`
1616
from the standard library) to uefi strings. Please head to the documentation of
1717
`EqStrUntilNul` to find out limitations and further information.
18+
- **Breaking**: renamed feature `ignore-logger-errors` to `panic-on-logger-errors` so that it is
19+
additive. It is now a default feature.
1820

1921
### Changed
2022

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ categories = ["embedded", "no-std", "api-bindings"]
1919
license = "MPL-2.0"
2020

2121
[features]
22-
default = []
22+
default = ["panic-on-logger-errors"]
2323
alloc = []
2424
exts = []
2525
logger = []
2626
# Ignore text output errors in logger as a workaround for firmware issues that
27-
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121)
28-
ignore-logger-errors = []
27+
# were observed on the VirtualBox UEFI implementation (see uefi-rs#121).
28+
# In those cases, this feature can be excluded by removing the default features.
29+
panic-on-logger-errors = []
2930

3031
[dependencies]
3132
bitflags = "1.3.2"

src/logger.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ impl log::Log for Logger {
7373
// Ignoring errors is bad, especially when they represent loss of
7474
// precious early-boot system diagnosis data, so we panic by
7575
// default. But if you experience this problem and want your UEFI
76-
// application to keep running when it happens, you can enable the
77-
// `ignore-logger-error` cargo feature. If you do so, logging errors
76+
// application to keep running when it happens, you can disalbe the
77+
// `panic-on-logger-errors` cargo feature. If you do so, logging errors
7878
// will be ignored by `uefi-rs` instead.
7979
//
80-
if !cfg!(feature = "ignore-logger-errors") {
80+
if cfg!(feature = "panic-on-logger-errors") {
8181
result.unwrap()
8282
}
8383
}

0 commit comments

Comments
 (0)