All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 19m4s
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
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()
|
|
|
|
# Timezone: PST (America/Los_Angeles) for consistent log timestamps
|
|
timezone = 'America/Los_Angeles'
|
|
log_timezone = 'America/Los_Angeles'
|
|
|
|
# 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 (useful for dev, can be disabled in production)
|
|
log_connections = on
|
|
log_disconnections = on
|