Domanda

Odio leggere registri di errore.Ogni volta che qualcosa va storto durante lo sviluppo e capovolgo all'errore log-up per vedere cosa è andato storto, sono depresso.Quello che voglio veramente è un modo per avere errori specifici invocare effetti sonori sulla mia macchina locale.Ad esempio, ogni errore NULL POINTER dovrebbe rendere il gioco clip trombone triste, un array fuori dall'eccezione dei limiti potrebbe essere un fischio di scorrimento che cade e così via.

C'è un modo per impostare questo per la mia finestra di console di Windows?

Modifica

Gli ambienti sono HAXE Targeting SWF 10, rotaie 3 su Webblick e un'applicazione Java standalone.Tutto eseguito in una finestra standard di Windows 7 console.

È stato utile?

Soluzione

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top