jdxi_editor.log_files

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

LOG_KEEP_DAYS

LEVELS

Functions

log_dir([home]) → pathlib.Path

Directory Decologr writes the log files to.

prune_logs([folder, days, now]) → int

Delete the session logs older than days days; returns how many were deleted.

saved_level(settings) → int

The level in Preferences (a number; a name is read too; anything else -> DEBUG).

apply_log_level(level, *loggers) → None

Write only the lines from level up (the program's loggers, the root and their handlers).

Module Contents

jdxi_editor.log_files.LOG_KEEP_DAYS = 14[source]
jdxi_editor.log_files.log_dir(home: pathlib.Path | None = None) → pathlib.Path[source]

Directory Decologr writes the log files to.

jdxi_editor.log_files.prune_logs(folder: pathlib.Path | None = None, days: int = LOG_KEEP_DAYS, now: float | None = None) → int[source]

Delete the session logs older than days days; returns how many were deleted.

jdxi_editor.log_files.LEVELS[source]
jdxi_editor.log_files.saved_level(settings) → int[source]

The level in Preferences (a number; a name is read too; anything else -> DEBUG).

jdxi_editor.log_files.apply_log_level(level: int, *loggers) → None[source]

Write only the lines from level up (the program’s loggers, the root and their handlers).