8.4. Logging Strategies
After covering the mechanics of logging in detail, one question
remains: which strategy do we apply? That depends on your situation
and no single perfect solution exists. Use Table 8-8 as a guideline.
Table 8-8. Logging strategy choices
Logging strategy
|
Situations when strategy is appropriate
|
---|
Writing logs to the filesystem
|
|
Database logging
|
|
Syslog logging
|
|
Syslog logging with Syslog-NG (reliable, safe)
|
|
Manual centralization (SCP,
SFTP)
|
|
Spread toolkit
|
|
Here is some general
advice about logging:
Think about what you want from your logs and configure Apache
accordingly. Decide how long you want to keep the logs. Decide at the beginning
instead of keeping the logs forever or making up the rules as you go. You will be storing the logs on a filesystem somewhere, so ensure the
filesystem does not overflow. To do this, delete the logs regularly. At the same time, put the log files on their own partition. That way,
even if the partition overflows, the rest of the system will continue
to function.
|