added a function for debug/info logging

master
BodgeMaster 2022-02-14 14:22:46 +01:00
parent e39368bf41
commit 928fa91671
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ EXIT_ERROR=1
default_configuration = { default_configuration = {
"window geometry": "640x480" "window geometry": "640x480"
} }
def info(message):
# print info to sys.stderr because it isnt really output, just debug information
print("INFO: "+str(message), file=sys.stderr)
traceback.print_stack()
def warn(message, is_exception=False): def warn(message, is_exception=False):
print("WARNING: "+str(message), file=sys.stderr) print("WARNING: "+str(message), file=sys.stderr)