diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-01-23 15:47:58 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-01-23 22:06:05 +0100 |
commit | 099810a65b8d7e7e83098edff144643b77011a85 (patch) | |
tree | 743bad4dae2177b55808a36c2764d8aa175f77aa /src/sleep | |
parent | 31f62bdd79472c32d52408956d5c82e9991ca425 (diff) | |
download | systemd-099810a65b8d7e7e83098edff144643b77011a85.tar.gz |
sleep: reduce double logging and improve messages and comments a bit
read_battery_capacity_percentage() was already logging, but with a slightly
different wording.
More could be done, I just touched the most noticable places. Especially
in debug messages, it is much more useful to be direct about what couldn't
be accessed or parsed, instead of providing "descriptive names" which are
not useful to the user at all, who then needs to read the code to figure out
what was the actual property name.
Diffstat (limited to 'src/sleep')
-rw-r--r-- | src/sleep/sleep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 20d3a94704..de5b9ae192 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -327,7 +327,8 @@ static int custom_timer_suspend(const SleepConfig *sleep_config) { } after_timestamp = now(CLOCK_BOOTTIME); - log_debug("Attempting to estimate battery discharge rate after wakeup from %s sleep", FORMAT_TIMESPAN(after_timestamp - before_timestamp, USEC_PER_HOUR)); + log_debug("Attempting to estimate battery discharge rate after wakeup from %s sleep", + FORMAT_TIMESPAN(after_timestamp - before_timestamp, USEC_PER_HOUR)); if (after_timestamp != before_timestamp) { r = estimate_battery_discharge_rate_per_hour(last_capacity, current_capacity, before_timestamp, after_timestamp); |