2012-05-18 10 views
5

Verwenden von pgFouine 1.2, PostgreSQL 9.1.3.Wie benutzt man pgFouine mit PostgreSQL 9.1?

postgresql.conf Einstellungen:

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 

Fehler ich immer bin, wenn pgFouine läuft:

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). 

ich die Protokolldatei in C:\Program Files\PostgreSQL\9.1\data\pg_log

fand ich bin mit habe verschiedene Einstellungen ausprobiert aber nichts funktioniert und konnte auch keine Lösung im Internet finden.

Danke für Ihre Hilfe!

+0

können Sie die ersten Zeilen Ihrer Protokolldatei zeigen? –

+0

@ DanielVérité: Hier sind ein paar Zeilen vom Anfang der Protokolldatei: http://paste2.org/p/2027616 –

Antwort

6

Versuchen Sie, die logtype Option hinzufügen:

pgfouine -logtype stderr -file filename 
+0

Vielen Dank, dass es funktioniert :) –

+0

Wo sollte ich den obigen Code hinzufügen? In der Protokolldatei oder postgresql.conf-Datei? – Jay

+0

@Jay: Es ist ein Befehl, den Sie in einen Shell-Interpreter eingeben. Siehe pgfouine Dokumentation. –