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
pathis not given, the tempfile module is used to determine the appropriate temporary location and a file namedsnowflake_core.logis 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; otherwisePermissionErroris raised. Existing owner-writable modes are tightened to0o600. 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.