I am having little problem in writing back to a property and log file.
What I am doing is i am searching a string in a logfile and counting the occurances of the string in the file and writing the matched strings into a file which i use to mail if the occurences increase in the logfile.
If the new count of search string will be same as old count then no mail will be sent. For that I am facing a problem in writing back the new occurance count to the property file .
Plus one more problem is in creating the logfile i want the logfile to be newly created/replaced but the matched string should get appended back to back to the new file.
How do i do it. please help
Below is my sample code
I am done with the log file creation problem.
but the writing the new matched strings count back to the property file as "TCount" is still not done.
Can i edit it or i have to erite the total properties file once again. please help.
My properties file:
I want to change the TCount to the new number of matched string so that next time my program runs it will not report the same error if the TCount will be same as NewCount.
If newcount will be greater then it will send the mail and change the TCount old value to the newcount value.
I am done with all other coding but not able to write the newcount value to TCount value keeping other parameters intact.