• Post Reply Bookmark Topic Watch Topic
  • New Topic

file change listener  RSS feed

 
Ali Khalfan
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've got an application at work that prints to a log file. Now i do not have control over the application, but i can access the log file. Is there a way i can listen to this file such that if it generates a certain message in the end of it i can fire an e-mail?
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is easy to use tail to follow a file and grep to look for a pattern. If you're on a Unix-like OS, that is.
 
Ali Khalfan
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the input joe,

i'm looking for a log monitor and my problem is that i got windows 2000 server (sadly)
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Install UnxUtils. It brings many Unix tools to Windows, including tail and grep.
 
vu lee
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For notification, you could create a thread which greps the msg which matched the pattern you are interested in the last said 10 minutes, and send the msg to other via java mail.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!