wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes changing the log file content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "changing the log file content" Watch "changing the log file content" New topic
Author

changing the log file content

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Hi,
In our environment, one application writes a logs in text format.Log file size goes upto 25MB .Log file rotation is used.
We want to modify the data(immediately) in the log file if record matches some expression. In what language program should be written?
Does the program need to poll the log file continuously?
Operating System is Solaris and we have Java/PERL installed.(and ofcourse SED/AWK).

Thanks


MH
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

You might have a better chance of getting this answered in the Linux forum, I'll move it there.


JBoss In Action
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

In what language program should be written?
Does the program need to poll the log file continuously?


If you are considering Java, check out JNotify


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Thanks. I think SED will be good option as its alread there. Ouput of log file will be piped to Shell Script where I am writing SED regular expression and then printing it out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing the log file content
 
Similar Threads
log method of servlet context
How can we get file Inode info using java?
Log in Servlet
log4j config file setup
Logging problem in websphere