mnoGoSearch 3.3.14 reference manual: Full-featured search engine software | ||
---|---|---|
Prev | Chapter 3. Indexing | Next |
mnoGoSearch programs indexer and search.cgi can use syslog to log its messages. Different verbose levels can be specified using the -v option in indexer command line, as well as with help of the LogLevel command in indexer.conf and search.cgi
Table 3-1. Verbose levels
0 | SILENT | suppress all logs. Default for search.cgi |
1 | ERROR | log only critical errors |
2 | WARNING | log warnings as well |
3 | INFO | add info messages to log. Default for indexer. |
4 | EXTRA | extra logging |
5 | DEBUG | for debug purposes |
By default, log messages are sent both to
syslog and to STDOUT/STDERR.
You can use the -l
command line
option to suppress logging to STDOUT/STDERR.
This can be useful when you run indexer
from cron.
Note: You can compile mnoGoSearch without syslog support. In order to do it, run configure --disable-syslog, then rebuild mnoGoSearch. When compiled without syslog support, mnoGoSearch can only use STDOUT/STDERR for logging.
syslog uses different facilities to separate log messages. mnoGoSearch uses the LOCAL7 facility by default. Facility be changed when running configure with the --enable-syslog=LOG_FACILITY option, where LOG_FACILITY is one of the standard facilities, usually listed in /usr/include/sys/syslog.h header file.
Facility helps to separate mnoGoSearch messages from others. You can modify /etc/syslog.conf to tell syslog how to handle mnoGoSearch messages. For example:
# Log all messages from mnoGoSearch to a separate file local7.* -/var/log/mnoGoSearch.log
Another example:
# Send all mnoGoSearch messages to the host "central" # Syslog on central should be configured to accept the messages local7.* @central
By default all messages are also logged to the file /var/log/messages. If you use mnoGoSearch actively, it can flood this file with a huge number of messages. To avoid this you can add local7.none or local7.!* (ignore any messages from the local7 facility) to your "catch-all" log files.
For example:
# # Some `catch-all' logfiles. # *.=info;*.=notice;*.=warn;\ auth,authpriv.none;\ cron,daemon.none;\ mail,news.none;\ local7.!* -/var/log/messages
Please take a look at syslogd(8) and syslog.conf(5) man pages for more information about syslog and its configuration notes.