문제

Reading 오류 로그가 싫다.개발 중에 뭔가 잘못 될 때마다 나는 오류로 뒤집어 오류를 뒤집으려면 뭔가 잘못되었는지 확인합니다. 나는 우울합니다.내가 정말로 원하는 것은 특정 오류가 내 로컬 컴퓨터에 사운드 효과를 호출하는 방법입니다.예를 들어, 모든 널 포인터 오류가 슬픈 트롬본 클립 재생을 만들어야하며, 경계선을 벗어난 배열은 낙하 슬라이드 휘슬 등이 될 수 있습니다.

내 Windows 콘솔 창 에서이 작업을 설정하는 방법이 있습니까?

편집

환경은 SWF 10, Rails 3의 Webrick 및 독립 실행 형 Java 응용 프로그램을 타겟팅하는 HAXE입니다.모든 것은 표준 Windows 7 콘솔 창에서 실행됩니다.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top