RPI: use logging facility instead print()

This commit is contained in:
Christian Ehrlicher 2022-11-11 20:50:33 +01:00
parent b5e81f1605
commit cbcfb8da72
5 changed files with 78 additions and 52 deletions

View file

@ -6,6 +6,7 @@ Hoymiles output plugin library
"""
import socket
import logging
from datetime import datetime, timezone
from hoymiles.decoders import StatusResponse
@ -310,4 +311,4 @@ class VolkszaehlerOutputPlugin(OutputPluginFactory):
try:
output.store_status(data, self.session)
except ValueError as e:
print('Could not send data to volkszaehler instance: %s' % e)
logging.warning('Could not send data to volkszaehler instance: %s' % e)