error-handlingsystem-sounds

Error log sound effects?


I hate reading error logs. Every time something goes wrong during development and I flip over to the error log up to see what's gone wrong I'm depressed. What I really want is a way to have specific errors invoke sound effects on my local machine. For example, every null pointer error should make the sad trombone clip play, an array out of bounds exception could be a falling slide whistle, and so on.

Is there a way to set this up for my Windows console window?

Edit

Environments are Haxe targeting SWF 10, Rails 3 on Webrick, and a standalone Java application. All run in a standard Windows 7 console window.


Solution

  • I don't use windows much nowadays. With that said, here's how I'd do it:

    1. Download and install cygwin, just to get bash and basic unix utilities, specifically, tail and grep. Those three should be enough to do the job, plus a $sound_player. You might be able to bypass cygwin and install bash, tail and grep independently.

    2. Open one bash shell for each kind of error that you want to make noise of.

    3. $ while tail -f $LOGFILE|grep $ERROR_MESSAGE; do $sound_player $SOUND_FILE; done

    There should be a way to do the equivalent of the above using the windows shell (cmd).