jdxi_editor.log_files ===================== .. py:module:: jdxi_editor.log_files .. autoapi-nested-parse:: The session logs: one file per start, kept for LOG_KEEP_DAYS days, and the level chosen in Preferences. From JD-Xi Studio 73f9d4ba. Attributes ---------- .. autoapisummary:: jdxi_editor.log_files.LOG_KEEP_DAYS jdxi_editor.log_files.LEVELS Functions --------- .. autoapisummary:: jdxi_editor.log_files.log_dir jdxi_editor.log_files.prune_logs jdxi_editor.log_files.saved_level jdxi_editor.log_files.apply_log_level Module Contents --------------- .. py:data:: LOG_KEEP_DAYS :value: 14 .. py:function:: log_dir(home: pathlib.Path | None = None) -> pathlib.Path Directory Decologr writes the log files to. .. py:function:: prune_logs(folder: pathlib.Path | None = None, days: int = LOG_KEEP_DAYS, now: float | None = None) -> int Delete the session logs older than *days* days; returns how many were deleted. .. py:data:: LEVELS .. py:function:: saved_level(settings) -> int The level in Preferences (a number; a name is read too; anything else -> DEBUG). .. py:function:: apply_log_level(level: int, *loggers) -> None Write only the lines from *level* up (the program's loggers, the root and their handlers).