> Flavio muito obrigado pelo esclarecimento,
> mas ainda não consegui gerar o relatório, da uma olhada
>
> o comando:
>  pgfouine.php -file postgresql-2011-09-29_151136.log > sample_default.html
> o erro:
> pgFouine did not find any valid PostgreSQL log line in your log file:
> * check that PostgreSQL uses an english locale for logging (lc_messages in
> your  postgresql.conf),
> * check that you use the -logtype option (syslog, stderr) according to your
> log file,
> * if you use syslog and log_line_prefix, check that your log_line_prefix has
> a trailing space,
> * if you use stderr, check that your log_line_prefix is of the form '%t
> [%p]: [%l-1] '.
> If you think your log file and your options are correct, please contact the
> auth or (gsmet on #postgresql@freenode or guillaume-pg at smet dot org).
> configuração:
> log_directory = 'pg_log'
> log_destination = 'stderr'
> logging_collector = on

Você está usando stderr e não syslog, tudo bem até aqui.

> log_min_duration_statement = 1
> log_line_prefix = '%t [%p]: [%l-1]'

Falta um espaço no final, antes do apóstrofe.

> terei mexer no lc_messages?

Se seu PostgreSQL estiver logando em outro idioma que não o inglês, sim.
Se seu log está logando [duração] ao invés de [duration] (abra o log
com less ou vi pra olhar), você pode converter seu log com o sed:
sed s/duração/duration/ postgresql-2011-09-29_151136.log > em_ingles.log

Aí passa pro pgFouine assim:
pgfouine.php -logtype=stderr -file postgresql-2011-09-29_151136.log >
sample_default.html

[]s
Flavio Gurgel
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a