vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello All, I'm trying to configure my PostgreSQL 8.1.x (on FreeBSD 6-STABLE) to log through syslog, yet somehow my logging doesn't end up in the specified log files. I'm kind of at a loss as to where i messed up. I'm hoping someone can help me fix it. Below are uncommented lines in my postgresql.conf file, related to logging: log_destination = 'syslog' # These are relevant when logging to syslog: syslog_facility = 'LOCAL0' syslog_ident = 'postgres' log_min_messages = debug5 # Values, in order of decreasing detail: log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements # and their durations, in milliseconds. silent_mode = on log_connections = on log_disconnections = on log_duration = on log_statement = 'all' # none, mod, ddl, all And i've appended the line below to my /etc/syslog.conf local0.* /var/log/pgsql Restarted both PostgreSQL and syslog, yet, nothing gets displayed in /var/log/pgsql. Can someone give me a clue? Thanks in advance. Nick ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| nicky wrote: > Hello All, > > I'm trying to configure my PostgreSQL 8.1.x (on FreeBSD 6-STABLE) to log > through syslog, yet somehow my logging doesn't end up in the specified > log files. > I'm kind of at a loss as to where i messed up. I'm hoping someone can > help me fix it. > > Below are uncommented lines in my postgresql.conf file, related to logging: > > log_destination = 'syslog' > > # These are relevant when logging to syslog: > syslog_facility = 'LOCAL0' > syslog_ident = 'postgres' > > log_min_messages = debug5 # Values, in order of decreasing > detail: > log_min_duration_statement = 0 # -1 is disabled, 0 logs all > statements > # and their durations, in > milliseconds. > silent_mode = on > > log_connections = on > log_disconnections = on > log_duration = on > > log_statement = 'all' # none, mod, ddl, all > > > And i've appended the line below to my /etc/syslog.conf > > local0.* /var/log/pgsql > > > Restarted both PostgreSQL and syslog, yet, nothing gets displayed in > /var/log/pgsql. > > What's in /usr/local/etc/rc.d/postgresql? Does it specify anything for logging? If so, it's likely to have something like PGLOG="$PGDATA/postgres.log". brian ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| ||||
| brian wrote: > nicky wrote: >> Hello All, >> >> I'm trying to configure my PostgreSQL 8.1.x (on FreeBSD 6-STABLE) to >> log through syslog, yet somehow my logging doesn't end up in the >> specified log files. >> I'm kind of at a loss as to where i messed up. I'm hoping someone can >> help me fix it. >> >> Below are uncommented lines in my postgresql.conf file, related to >> logging: >> >> log_destination = 'syslog' >> >> # These are relevant when logging to syslog: >> syslog_facility = 'LOCAL0' >> syslog_ident = 'postgres' >> >> log_min_messages = debug5 # Values, in order of >> decreasing detail: >> log_min_duration_statement = 0 # -1 is disabled, 0 logs all >> statements >> # and their durations, in >> milliseconds. >> silent_mode = on >> >> log_connections = on >> log_disconnections = on >> log_duration = on >> >> log_statement = 'all' # none, mod, ddl, all >> >> >> And i've appended the line below to my /etc/syslog.conf >> >> local0.* /var/log/pgsql >> >> >> Restarted both PostgreSQL and syslog, yet, nothing gets displayed in >> /var/log/pgsql. >> >> > > What's in /usr/local/etc/rc.d/postgresql? Does it specify anything > for logging? If so, it's likely to have something like > PGLOG="$PGDATA/postgres.log". > > brian I don't see any reference to logging in my start script (appended at the end). I'm using the default flags. The only flag i see that might be interesting is the -s. However, removing it doesn't change a thing. Nick ----------------------- # $FreeBSD: ports/databases/postgresql81-server/files/pgsql.sh.tmpl,v 1.22 2006/05/23 21:18:58 girgen Exp $ # # PROVIDE: postgresql # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable PostgreSQL: # # postgresql_enable="YES" # # optional # postgresql_data="/usr/local/pgsql/data" # postgresql_flags="-w -s -m fast" # # This scripts takes one of the following commands: # # start stop restart reload status initdb # # For postmaster startup options, edit ${postgresql_data}/postgresql.conf prefix=/usr/local command=${prefix}/bin/pg_ctl .. /etc/rc.subr load_rc_config postgresql # set defaults postgresql_enable=${postgresql_enable:-"NO"} postgresql_flags=${postgresql_flags:-"-w -s -m fast"} postgresql_user=pgsql eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} postgresql_class=${postgresql_class:-"default"} name=postgresql rcvar=`set_rcvar` command_args="-D ${postgresql_data} ${postgresql_flags}" extra_commands="reload initdb" start_cmd="postgresql_command start" stop_cmd="postgresql_command stop" restart_cmd="postgresql_command restart" reload_cmd="postgresql_command reload" status_cmd="postgresql_command status" initdb_cmd="postgresql_initdb" postgresql_command() { su -l ${postgresql_user} -c "exec ${command} ${command_args} ${rc_arg}" } postgresql_initdb() { su -l -c ${postgresql_class} ${postgresql_user} -c "exec ${prefix}/bin/initdb -D ${postgresql_data}" } run_rc_command "$1" ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |