n0bel / PiClock

A Fancy Clock built around a monitor and a Raspberry Pi
MIT License
566 stars 182 forks source link

use an actual logger #143

Open ScottChapman opened 5 years ago

ScottChapman commented 5 years ago

I realize that the startup script does a basic file rotation when started, but it's not using an actually logging mechanism (maybe even the one built into Python).

I'm not really a python developer so I don't have specific experience with it. But it is documented here: https://docs.python.org/2/library/logging.html

What is nice about this kind of approach is that it has a file-rotation mechanism built into it that will rotate when it is needed rather than just on startup.

Plus you can externalize the configuration so people can basically customize the logging for their own deployment.