How can I change the debug and info messages that appear in the terminal when I am running an automation through the terminal (e.g., python chemostat.py
).
In particular, how can I hide/remove lines such as
xxxx DEBUG [app] [remove_waste] Cleaned up GPIO-12.
xxxx DEBUG [app] [add_media] Initialized GPIO-13 using hardware-timing, initial frequency = 200.0 hz.
How can I edit lines such as:
xxxx INFO [app] [add_media] 0.5mL
xxxx INFO [app] [dosing_automation] DilutionEvent: exchanged 1.0mL
And how can I add my own messages when running an automation? Is there a way to generate my own message every time self.execute()
runs.
Thanks!
Example log:
2023-01-05T03:49:05+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:06+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:07+0000 INFO [app] [remove_waste] 1.0mL
2023-01-05T03:49:07+0000 DEBUG [app] [remove_waste] Initialized GPIO-12 using hardware-timing, initial frequency = 200.0 hz.
2023-01-05T03:49:19+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:19+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:25+0000 INFO [app] [add_media] 0.5mL
2023-01-05T03:49:25+0000 DEBUG [app] [add_media] Initialized GPIO-13 using hardware-timing, initial frequency = 200.0 hz.
2023-01-05T03:49:31+0000 DEBUG [app] [add_media] Cleaned up GPIO-13.
2023-01-05T03:49:31+0000 DEBUG [app] [add_media] Cleaned up GPIO-13.
2023-01-05T03:49:37+0000 INFO [app] [remove_waste] 0.5mL
2023-01-05T03:49:37+0000 DEBUG [app] [remove_waste] Initialized GPIO-12 using hardware-timing, initial frequency = 200.0 hz.
2023-01-05T03:49:43+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:43+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:44+0000 INFO [app] [remove_waste] 1.0mL
2023-01-05T03:49:44+0000 DEBUG [app] [remove_waste] Initialized GPIO-12 using hardware-timing, initial frequency = 200.0 hz.
^C2023-01-05T03:49:47+0000 DEBUG [app] [dosing_control] Exiting caused by signal Interrupt.
2023-01-05T03:49:56+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:56+0000 DEBUG [app] [remove_waste] Cleaned up GPIO-12.
2023-01-05T03:49:57+0000 INFO [app] [dosing_automation] DilutionEvent: exchanged 1.0mL