mtg-card-lookup/debug.py

14 lines
262 B
Python
Raw Normal View History

from enum import Enum
from datetime import datetime
import aiohttp
DEBUG = True
class Severity(Enum):
MESSAGE = 'M'
WARNING = 'W'
ERROR = 'E'
def log(message, severity=Severity.MESSAGE):
if DEBUG:
print(f'{datetime.now()}: [{severity.value}] {message}')