This is a document for PGroonga 1.X. See PGroonga 2.x document when you're using recent PGroonga.
pgroonga.log_type
parameterpgroonga.log_type
parameter controls how to log.
You can choose one log type from the followings:
Log to a file
Log by Windows event log
Log by log system in PostgreSQL
PGroonga logs to a file by default. File path is specified by pgroonga.log_path
parameter.
In SQL:
SET pgroonga.log_type = type;
In postgresql.conf
:
pgroonga.log_type = type
type
is an enum value. It means that you must choose one of them:
file
: PGroonga logs to a file
windows_event_log
: PGroonga logs by Windows event log
postgresql
: PGroonga logs by log system in PostgreSQL
Here is an example to use log system in PostgreSQL:
SET pgroonga.log_type = postgresql;
Here is an example to use Windows event log:
SET pgroonga.log_type = windows_event_log;
You can confirm logs from PGroonga by Event Viewer. But it may not be easy to read because Event Viewer shows PGroonga logs with warnings.
You can suppress the warnings from Event Viewer by registering PGroonga
event source to Windows:
> regsvr32 /n /i:PGroonga ${PostgreSQL install folder}\lib\pgevent.dll
See also Registering Event Log on Windows.