سؤال

أكره قراءة سجلات الأخطاء.في كل مرة يحدث فيها شيء خاطئ أثناء التطوير وأنا أقفل إلى سجل الخطأ لأعلى لمعرفة ما حدث خطأ أنا مكتئب.ما أريده حقا هو وسيلة للحصول على أخطاء محددة استدعاء تأثيرات صوتية على جهازي المحلي.على سبيل المثال، يجب أن يجعل كل خطأ مؤشر فارق لعب Clip Clip Play Sad Trombone، ويمكن أن يكون نصيحة خارج الحدود صافرة سقوط شريحة، وهكذا.

هل هناك طريقة لتعيين هذا حتى نافذة Windows Console الخاصة بي؟

تحرير

البيئات هي المستهدفة Haxe SWF 10، القضبان 3 على Webrick، وتطبيق Java المستقل.تشغيل جميع في نافذة وحدة التحكم في ويندوز 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