728x90
- Prefect 서버의 로깅을 파일로 남기기 위해선 logging.yml 설정이 필요합니다.
- profiles.toml 안에 logging.yml 파일 경로를 지정해줘야합니다.
profiles.toml
PREFECT_LOGGING_LEVEL = "INFO"
PREFECT_LOGGING_SETTINGS_PATH = "/root/.prefect/logging.yml"
logging.yml
# 하루 1번 00:00:00에 로테이트를 수행합니다.
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
handlers:
file_handler:
class: logging.handlers.TimedRotatingFileHandler
level: INFO
formatter: simple
filename: /usr/service/prefect/logs/prefect.log
when: midnight
interval: 1
backupCount: 7
root:
level: INFO
handlers: [file_handler]
728x90
'Prefect' 카테고리의 다른 글
[Prefect] SlackWebhook 사용법 (1) | 2023.12.20 |
---|---|
[Prefect] Blocks for Infrastructure & RemoteFileSystem (0) | 2023.05.22 |
[Prefect] Configuration (0) | 2023.05.22 |
[Prefect] Installation & Run (0) | 2023.05.22 |
[Prefect] Docker-Compose (0) | 2023.02.01 |