Commit 996df4b3 authored by Otthorn's avatar Otthorn 🤔
Browse files

added log_time function

parent ba79154b
from time import strftime
def log_time():
return strftime("%d/%m/%Y %H:%M:%S")
import requests import requests
import configparser 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.matrix_bot_api import MatrixBotAPI
from matrix_bot_api.mregex_handler import MRegexHandler
from matrix_bot_api.mcommand_handler import MCommandHandler from matrix_bot_api.mcommand_handler import MCommandHandler
# Inherit the MatrixBotAPI Class to overload it # Inherit the MatrixBotAPI Class to overload it
...@@ -60,7 +59,7 @@ class MatrixBotAPIWithKey(MatrixBotAPI): ...@@ -60,7 +59,7 @@ class MatrixBotAPIWithKey(MatrixBotAPI):
query = " ".join(args[1:]) query = " ".join(args[1:])
# Print monitoring information # 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) 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