Idea for Logging Tool

Date May 16, 2008 by Isaac

The piece of software that I test at work has an option to enable debug logging to a file. Normally, I run with this enabled so that I have a record of what I did and any errors that I encounter. However, this file can become extremely bloated and if often hundreds of megabytes by the time I give it to the developer to fix a problem that I found. I was thinking today about a solution that would be useful for any program that can dump logs to a file. In Linux, you can create a named pipe, that other programs can write to. Would it be possible to have one program create this pipe, then have the program under test write to this pipe instead of a file? I haven't tested this, but I imagine it's possible.

Where this would be useful is your "log interceptor" program could do a multitude of different things with this stream of log data. For example, it could push it into a database which could later be searched by developers to narrow down time windows or look for specific error messages. Another really useful thing to do would be to have the log interceptor do basic log rotation. This could keep the log file size manageable. Or, maybe you want the log file emailed somewhere every 100k or whatever. There are a lot of uses I could see for something like this.

Has anyone written or seen such a program? Am I the only one that thinks this would be useful? Post a comment and let me know what you think.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>