Skip to content

The Logger Class

Ian Andretta edited this page Aug 4, 2026 · 3 revisions

Logger Class

To make an Logger an instance its requires one argument the path to the folder where you logs will be recorded, also you can specify if its includes the time or the level both are set to true by default.

Example: `Logger("path_of_folder", include_time=True, include_level=True)

The Log Method

Use the log method with a message, and a LoggerLevel argument - see LoggerLevel

logger.log("Cannot divide by zero", Logger.ERROR)

Output:
Screenshot From 2026-07-25 02-59-03

Auto Compressing

The logger class will automatically compress old log files into zip files this can be controlled changing "compress_files"
compress_files=False

Clone this wiki locally