2012-05-18 41 views
5

使用pgFouine 1.2,PostgreSQL 9.1.3。如何在PostgreSQL 9.1中使用pgFouine?

postgresql.conf裏設置:

C:\Users\Razvan\Desktop\pgfouine-1.2>php pgfouine.php -file log > report.html

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 author (gsmet on #[email protected] or guillaume-pg at smet dot org). 

我正在使用C:\Program Files\PostgreSQL\9.1\data\pg_log

我發現日誌文件:在運行時pgFouine

log_min_duration_statement = 0 
log_duration = on 
log_line_prefix = '%t [%p]: [%l-1] ' 
log_statement = 'all' 
lc_messages = 'C'   # locale for system error message strings 
lc_monetary = 'C'   # locale for monetary formatting 
lc_numeric = 'C'   # locale for number formatting 
lc_time = 'C'    # locale for time formatting 

錯誤我得到嘗試了各種設置,但沒有工作和在互聯網上也找不到任何解決方案。

感謝您的幫助!

+0

你能證明你的日誌文件的第一行? –

+0

@DanielVérité:以下是日誌文件開頭的幾行:http://paste2.org/p/2027616 –

回答

6

嘗試添加日誌類型選項:

pgfouine -logtype stderr -file filename 
+0

非常感謝,它使它工作:) –

+0

我應該在哪裏添加上面的代碼?在日誌文件或postgresql.conf文件中? – Jay

+0

@Jay:這是您在shell解釋器中輸入的命令。請參閱pgfouine文檔。 –

相關問題