jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
398 stars 56 forks source link

Make logging opt-in #43

Closed jonas-schievink closed 5 years ago

jonas-schievink commented 5 years ago

Logging seems to approximately double the size of the stack due to all the Display/Debug impls and string literals.

Logging should be opt-in via a log Cargo feature. This means we have to define our own logging macros that forward to the ones in log if the feature is enabled, and that expand to nothing if not.

Until rubble is split into a library, the feature can stay on by default to ease development.

jonas-schievink commented 5 years ago

Ah this is already done:

https://github.com/jonas-schievink/rubble/blob/ee8737712b3ea9030bd77e4355a5455330f285f1/rubble/Cargo.toml#L19-L23