Alternatively, define a function that accepts *args and then join them in your call to logger:
def log(*args, logtype='debug', sep=' '): getattr(logger, logtype)(sep.join("{}".formatstr(a) for a in args)) I added a logtype for flexibility here but you could remove it if not required.