This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Show new php error log's lines into KDE notification

Tags: None
(comma "," separated)
User avatar
nulll
Registered Member
Posts
11
Karma
0
OS
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!
Minio
Registered Member
Posts
177
Karma
1
OS
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


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell