質問
私はエラーログを読み取るのが嫌いです。開発中に何かがうまくいくたびに、私は間違ったものが何であるかを見るためにログオンしたときにエラーに反転します。私が本当に欲しいのは、特定のエラーを持つ方法で、私のローカルマシンに効果音を呼び出す方法です。たとえば、すべてのNULLポインタエラーがSADトロンボーンクリッププレイを作成する必要があります。範囲外の例外の配列は、下降スライドホイッスルなどである可能性があります。
私のWindowsコンソールウィンドウにこれを設定する方法はありますか?
編集
環境は、SWF 10、WebRick上のRails 3、およびスタンドアロンのJavaアプリケーションをターゲットにしているHAXEです。標準のWindows 7コンソールウィンドウで実行されています。
解決
I don't use windows much nowadays. With that said, here's how I'd do it:
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.
Open one bash shell for each kind of error that you want to make noise of.
$ 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).