import logging



if False:
	_logger = logging.getLogger(__name__)
	logging.basicConfig(
		filename = "marble_madness.log",
		filemode = "w", #override default "a"

		#https://docs.python.org/3/library/logging.html#logrecord-attributes
		#format  = "%(asctime)s.%(msecs)03d : %(message)s",
		format = "%(relativeCreated)d : %(message)s",

		#https://docs.python.org/3/library/time.html#time.strftime
		datefmt = "%Y-%M-%d %H:%M:%S",

		level = logging.DEBUG
	)
else:
	_logger = None



def info( msg:str, *args, **kwargs ):
	if not _logger: return
	_logger.debug( msg, *args, **kwargs )

def warning( msg:str, *args, **kwargs ):
	if not _logger: return
	_logger.warning( msg, *args, **kwargs )

def error( msg:str, *args, **kwargs ):
	if not _logger: return
	_logger.critical( msg, *args, **kwargs )



info("startup")
