Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hvalev committed Nov 15, 2021
1 parent 57b8181 commit f826cc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dht22mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ def log2file(filename, params):
def log2stdout(timestamp, msg, type):
if('log2stdout' in dht22mqtt_logging_mode):
if type == 'info':
logging.info(datetime.fromtimestamp(timestamp).strftime('%Y-%m-%dT%H:%M:%SZ'), str(msg))
logging.info(datetime.fromtimestamp(timestamp).strftime('%Y-%m-%dT%H:%M:%SZ')+' '+str(msg))
if type == 'warning':
logging.warning(datetime.fromtimestamp(timestamp).strftime('%Y-%m-%dT%H:%M:%SZ'), str(msg))
logging.warning(datetime.fromtimestamp(timestamp).strftime('%Y-%m-%dT%H:%M:%SZ')+' '+str(msg))
if type == 'error':
logging.error(datetime.fromtimestamp(timestamp).strftime('%Y-%m-%dT%H:%M:%SZ'), str(msg))
logging.error(datetime.fromtimestamp(timestamp).strftime('%Y-%m-%dT%H:%M:%SZ')+' '+str(msg))


###############
Expand Down

0 comments on commit f826cc9

Please sign in to comment.