from loguru import logger log_file = "sc1--{time:ddd--mm}.log" log_file2 = "sc2--{time:ddd--HH}.log" # Note. Neither HH:mm or mm:HH work log_format = '{time:MM-DD-YY at HH:mm} | {level} | {file}:{line} | {function} | {message}' log_rotation = '1 minute' log_compression = 'zip' log_level = 'INFO' #logger.remove(0) logger.add(log_file, format=log_format, rotation=log_rotation, compression=log_compression, level= log_level) logger.add(log_file2, format=log_format, rotation=log_rotation, compression=log_compression, level= log_level) def main(): print ('In test') logger.info("Going to the log") logger.warning("warning") if __name__ == '__main__': main()