Adds timestamps into logs by default
This commit is contained in:
parent
2527dc2f20
commit
b2cb2dfff0
4 changed files with 11 additions and 0 deletions
|
@ -36,6 +36,7 @@ class postgresql::globals (
|
|||
$bindir = undef,
|
||||
$xlogdir = undef,
|
||||
$logdir = undef,
|
||||
$log_line_prefix = undef,
|
||||
|
||||
$user = undef,
|
||||
$group = undef,
|
||||
|
|
|
@ -4,6 +4,7 @@ class postgresql::params inherits postgresql::globals {
|
|||
$postgis_version = $postgresql::globals::globals_postgis_version
|
||||
$listen_addresses = 'localhost'
|
||||
$port = 5432
|
||||
$log_line_prefix = '%t '
|
||||
$ip_mask_deny_postgres_user = '0.0.0.0/0'
|
||||
$ip_mask_allow_all_users = '127.0.0.1/32'
|
||||
$ipv4acls = []
|
||||
|
|
|
@ -38,6 +38,8 @@ class postgresql::server (
|
|||
$xlogdir = $postgresql::params::xlogdir,
|
||||
$logdir = $postgresql::params::logdir,
|
||||
|
||||
$log_line_prefix = $postgresql::params::log_line_prefix,
|
||||
|
||||
$pg_hba_conf_defaults = $postgresql::params::pg_hba_conf_defaults,
|
||||
|
||||
$user = $postgresql::params::user,
|
||||
|
|
|
@ -20,6 +20,7 @@ class postgresql::server::config {
|
|||
$datadir = $postgresql::server::datadir
|
||||
$logdir = $postgresql::server::logdir
|
||||
$service_name = $postgresql::server::service_name
|
||||
$log_line_prefix = $postgresql::server::log_line_prefix
|
||||
|
||||
if ($manage_pg_hba_conf == true) {
|
||||
# Prepare the main pg_hba file
|
||||
|
@ -115,6 +116,12 @@ class postgresql::server::config {
|
|||
}
|
||||
|
||||
}
|
||||
# Allow timestamps in log by default
|
||||
if $log_line_prefix {
|
||||
postgresql::server::config_entry {'log_line_prefix':
|
||||
value => $log_line_prefix,
|
||||
}
|
||||
}
|
||||
|
||||
# RedHat-based systems hardcode some PG* variables in the init script, and need to be overriden
|
||||
# in /etc/sysconfig/pgsql/postgresql. Create a blank file so we can manage it with augeas later.
|
||||
|
|
Loading…
Reference in a new issue