Files
flyer-crawler.projectium.com/docker/postgres/postgresql.conf.override

30 lines
907 B
Plaintext

# PostgreSQL Logging Configuration for Database Function Observability (ADR-050)
# This file is mounted into the PostgreSQL container to enable structured logging
# from database functions via fn_log()
# Enable logging to files for Logstash pickup
logging_collector = on
log_destination = 'stderr'
log_directory = '/var/log/postgresql'
log_filename = 'postgresql-%Y-%m-%d.log'
log_rotation_age = 1d
log_rotation_size = 100MB
log_truncate_on_rotation = on
# Log level - capture NOTICE and above (includes fn_log WARNING/ERROR)
log_min_messages = notice
client_min_messages = notice
# Include useful context in log prefix
log_line_prefix = '%t [%p] %u@%d '
# Capture slow queries from functions (1 second threshold)
log_min_duration_statement = 1000
# Log statement types (off for production, 'all' for debugging)
log_statement = 'none'
# Connection logging
log_connections = on
log_disconnections = on