snowflake.core.simple_file_logging

snowflake.core.simple_file_logging(path: str | Path | None = None, *, level: int = 10, format: str = '%(asctime)s - %(name)s - %(levelname)s - %(message)s') → None

Set up snowflake.core logging to a file.

If path is not given, the tempfile module is used to determine the appropriate temporary location and a file named snowflake_core.log is created.

The log file is opened with mode 0o600 (owner read/write only). If the path already exists it must be a regular file owned by the current user; otherwise PermissionError is raised. Existing owner-writable modes are tightened to 0o600. Symlinks are not followed.

Parameters:
  • path (str or pathlib.Path, optional) – Destination log file. Defaults to <tempdir>/snowflake_core.log.

  • level (int, optional) – Logging level enabled for the file. Default is logging.DEBUG.

  • format (str, optional) – Log record format string for the file handler.