错误日志音效?
我讨厌阅读错误日志。每当开发过程中出现问题时,我就会翻到错误日志以查看出了什么问题,我就会感到沮丧。我真正想要的是一种让特定错误在我的本地计算机上调用声音效果的方法。例如,每个空指针错误都应该播放悲伤的长号剪辑,数组越界异常可能是掉落的幻灯片哨声,等等。
有没有办法为我的 Windows 控制台窗口进行设置?
编辑
环境是针对 SWF 10 的 Haxe、Webrick 上的 Rails 3 以及独立的 Java 应用程序。所有这些都在标准 Windows 7 控制台窗口中运行。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我现在不太用windows了。话虽如此,我的做法如下:
下载并安装 cygwin,只是为了获取 bash 和基本的 UNIX 实用程序,特别是 tail 和 grep。这三个应该足以完成这项工作,再加上一个 $sound_player。您也许能够绕过 cygwin 并独立安装 bash、tail 和 grep。
为您想要发出噪音的每种错误打开一个 bash shell。
$ while tail -f $LOGFILE|grep $ERROR_MESSAGE;执行 $sound_player $SOUND_FILE;完成
应该有一种方法可以使用 Windows shell (cmd) 执行与上述操作等效的操作
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).