Open b3 opened 7 years ago
I created a branch on my fork which propose a solution to the issue : b3/battery-stats@7ea441d1295abbe83a80323f40a27732d6d52553
I do not think that the missing power supply should cause a cron email. In fact I am unsure that this message should be raised at all. Without power supply detection battery-stats-collector
still work.
My idea for the proposition was that if the connected status (online or offline) can be detected it should be logged, but if it can not be detected that information shoud be logged too.
That was why I proposed 3 states.
I do not presuppose any use of that last information though.
Right. make sense to me.
Do you think my proposition should be integrated in your code? If yes I can just make a pull request of my demo branch.
[Bruno BEAUFILS]
Do you think my proposition should be integrated in your code? If yes I can just make a pull request of my demo branch.
Yes. Please make a pull request.
Happy hacking Petter Reinholdtsen
I have the same message in logs "No power supply found". For me, it's because my power supply is seen as ADP0, battery-stats-collector looks for aconline status in several places, including ADP1, but not ADP0. Removing Warnings will solve the problem and perhaps others. Adding a look at ADP0 will solve som problems too.
In
battery-stats-collector
whenget_logline
is unable to determine a value forac_online
it echoes a message warning that "No power supply found". This line then goes to the log file before the status line is echoed.That way the generated file becomes unusable since every two lines it contains non-data. On my host it looks likes something like :
The warning line should not be echoed, or at least not on stdout.