Sunday, March 1, 2009

Dealing with Log files

WSF/PHP uses two log files to log down certain messages useful for tracing and debugging incase of an error. These logs are handled by the underlying WSF/C Framework. It supports a log rotation as well.

Following are the log level supported by WSF/PHP.

Log values are set to the wsf.log_level php.ini entry.

0 -> CRITICAL  ( Only critical errors will be logged )
1 -> ERROR      ( Errors will be logged)
2 -> WARNING  ( Errors and Warnings will be logged)
3 -> INFO       ( Errors , Warnings and Information will be logged)
4 -> DEBUG   ( All log messages including debug messages will be logged)

When you have enabled log higher log levels, a large number of log messages are done to the log file which result in the log file growing rapidly with the number of messages processed. This would not be a problem if you are running your system for testing. But if you are running it on production this could cause some problems, because we noticed that these is a issue in the log rotation scheme for WSF/PHP 2.0.0. Due to this issue, a number of users have complained that apache stopped working as well. Therefore it is recommenced that you used the log level 0 on production systems.

9 comments:

  1. thanks for the info!

    it would be great if this potential pitfall could could be mentioned more clearly in the initial setup instructions, as it is otherwise very hard to find and a problem we faced (each WSO call was creating about 3M of log file, and apache was crashing after about 10 calls).

    ReplyDelete
  2. How to find particular characters in latest 15 or more log files in unix through command?

    ReplyDelete
  3. How log files are maintained in an operating system and also what is handling man pages/help system?

    ReplyDelete
  4. How log files are maintained in an operating system and also what is handling man pages/help system?

    ReplyDelete
  5. What will happen if I delete all the log files on a windows XP installation?

    ReplyDelete
  6. How log files are maintained in an operating system and also what is handling man pages/help system?

    ReplyDelete
  7. How to find particular characters in latest 15 or more log files in unix through command?

    ReplyDelete
  8. How to find particular characters in latest 15 or more log files in unix through command?

    ReplyDelete
  9. What scripting language I should learn to look more efficiently log files of an application?

    ReplyDelete