Thread: Postgresql 9.1 logging

Postgresql 9.1 logging

From
Birta Levente
Date:
Hi all

I use postgresql 9.1.2 on centos 6.2 and I want to use pgfouine, but in
my log file appear #011, #015 ... characters and the pgfouine can't
handle it.
Can I configure the server or rsyslog to log without these characters or
I need filter separately?

thanks
Levi

the log section from my configuration file:

log_destination = 'syslog'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql-%a.log
log_truncate_on_rotation = on
log_rotation_age = 0
log_rotation_size = 0
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
silent_mode = on
client_min_messages = log
log_min_messages = warning
log_min_error_statement = info
log_min_duration_statement = 0
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
log_checkpoints = on
#log_connections = off
#log_disconnections = off
log_duration = off
#log_error_verbosity = default
#log_hostname = off
log_line_prefix = 'user=%u,db=%d,host=%h '
#log_lock_waits = off
log_statement = 'none'
log_temp_files = 4096
#log_timezone = unknown



Re: Postgresql 9.1 logging

From
Andreas Kretschmer
Date:
Birta Levente <blevi.linux@gmail.com> wrote:

> Hi all
>
> I use postgresql 9.1.2 on centos 6.2 and I want to use pgfouine, but in
> my log file appear #011, #015 ... characters and the pgfouine can't
> handle it.
> Can I configure the server or rsyslog to log without these characters or
> I need filter separately?
>
> thanks
> Levi
>
> the log section from my configuration file:

Set lc_message = 'C' in your postgresql.conf and restart/reload the server.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

Re: Postgresql 9.1 logging

From
Birta Levente
Date:
On 04/01/2012 16:15, Andreas Kretschmer wrote:
> Birta Levente<blevi.linux@gmail.com>  wrote:
>
>> Hi all
>>
>> I use postgresql 9.1.2 on centos 6.2 and I want to use pgfouine, but in
>> my log file appear #011, #015 ... characters and the pgfouine can't
>> handle it.
>> Can I configure the server or rsyslog to log without these characters or
>> I need filter separately?
>>
>> thanks
>> Levi
>>
>> the log section from my configuration file:
> Set lc_message = 'C' in your postgresql.conf and restart/reload the server.
>
>
> Andreas
Thanks for your the reply, but nothing changed. When log to stderr these
characters not appear (even with lc_messages='en_US.utf8'), but pgfouine
recommend to use with syslog.
It's very simple to make a sed and work fine.... I am just curious to
know if it's possible.

Thanks anyway

Levi