Commit 996df4b3 authored by Otthorn's avatar Otthorn 🤔

added log_time function

parent ba79154b
from time import strftime
def log_time():
return strftime("%d/%m/%Y %H:%M:%S")
import requests
import configparser
from time import strftime
from log_time import log_time
from matrix_bot_api.matrix_bot_api import MatrixBotAPI
from matrix_bot_api.mregex_handler import MRegexHandler
from matrix_bot_api.mcommand_handler import MCommandHandler
# Inherit the MatrixBotAPI Class to overload it
......@@ -60,7 +59,7 @@ class MatrixBotAPIWithKey(MatrixBotAPI):
query = " ".join(args[1:])
# Print monitoring information
print("[{}] WEATHER called with query={} in room={}".format(strftime("%d/%m/%Y %H:%M:%S"), query, room.display_name))
print("[{}] WEATHER called with query={} in room={}".format(log_time(), query, room.display_name))
summary = self.query_weather(query)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment