Analyzing Log Files and Error Logging

I was investigating a problem today that required analyzing and comparing our production apache log. In the past I have had the luxury of Splunk but I don’t anymore. So I set out on a search to find a simple viewer for logs. Something where I could just run directly on a mac os x machine load log files and run some basic filtering against strings and what not. However, to my surprise it seems this market is mostly untapped besides for enterprise level solutions such as splunk and other various third party, cloud based service providers. I did come across the log file viewer project which looked promising until I learned it was only available for Windows. Anyway I ended up writing my own little one off console command to migrate a log file to a database table but am still curious if anything like apache log viewer is available on mac os x. Splunk was awesome the closer to that the better but running locally NOT on a remote server.

Also the project which I’m working on has hundreds of error_log calls in it (780ish to be exact). On top of that we also have a custom logging function. The custom logging function is being used in place of error_log for new development. However, it would be nice to somehow have all error_log calls handled via our custom logging. The only approach that comes to mind currently is manually replacing those calls which results in a lot of work and file modifications. Can anyone recommend a more automated approach of replacing the standard error_log implementation with a custom one which DOES NOT require modifying every file that error_log call is present in? Project is also composerles and sitting on a box with php 5.3.

Regarding the log analysis, may be I am a too old-school, but for viewing/analyzing logs I always used just regular command line tools like tail, less, grep and sometimes somewhat more sophisticated techniques like cut, uniq sort or even awk, in which I whish I had more expertise.

As of the custom logging solution, Monolog is an industry standard, I believe.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.