Registered Member
|
Hi, I am a php developer, I was wondering if it was possible to receive KDE notifications when new lines are written into the php error log and the mysql slow query log...
can you please help me? Thanks! |
Registered Member
|
As I understand, you have access to error.log files.
Then there are two things you need: 1. send yourself notification with error. Use notify-send or kdialog --passivepopup 2. do it when file changes. That would be tricky part, but fortunately we have inotify now. Use incron or inotify-tools. All you need know is getting these last error messages (use grep and tail, maybe tac) and feed them to your notification system. Fire that script when file content change. But honestly, I would just put konsole with tail -f somewhere visible. Or multitail, for that matter.
Best regards
Mirosław Zalewski |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell