diff --git a/api/.env.example b/api/.env.example index dbc402d34b55c7..5751605b48119c 100644 --- a/api/.env.example +++ b/api/.env.example @@ -367,6 +367,10 @@ LOG_FILE= LOG_FILE_MAX_SIZE=20 # Log file max backup count LOG_FILE_BACKUP_COUNT=5 +# Log dateformat +LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S +# Log Timezone +LOG_TZ=UTC # Indexing configuration INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=1000 diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py index 23ccba60a26496..f368a194693f73 100644 --- a/api/configs/feature/__init__.py +++ b/api/configs/feature/__init__.py @@ -376,7 +376,7 @@ class LoggingConfig(BaseSettings): LOG_TZ: Optional[str] = Field( description="Timezone for log timestamps (e.g., 'America/New_York')", - default=None, + default="UTC", ) diff --git a/docker/.env.example b/docker/.env.example index 12443ee7f25a04..0b181d831aa648 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -54,6 +54,10 @@ LOG_FILE= LOG_FILE_MAX_SIZE=20 # Log file max backup count LOG_FILE_BACKUP_COUNT=5 +# Log dateformat +LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S +# Log Timezone +LOG_TZ=UTC # Debug mode, default is false. # It is recommended to turn on this configuration for local development diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 9294d561597f40..2835f793d6b2d7 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -4,6 +4,10 @@ x-shared-env: &shared-api-worker-env LOG_FILE: ${LOG_FILE:-} LOG_FILE_MAX_SIZE: ${LOG_FILE_MAX_SIZE:-20} LOG_FILE_BACKUP_COUNT: ${LOG_FILE_BACKUP_COUNT:-5} + # Log dateformat + LOG_DATEFORMAT: ${LOG_DATEFORMAT:-%Y-%m-%d %H:%M:%S} + # Log Timezone + LOG_TZ: ${LOG_TZ:-UTC} DEBUG: ${DEBUG:-false} FLASK_DEBUG: ${FLASK_DEBUG:-false} SECRET_KEY: ${SECRET_KEY:-sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U}