Hi, I want to use log4j to write transactions/records into file. One transaction/log per line is required but in the beginning of file i need to write the count value i.e. the number of transactions/records contained in the file. Is there any efficient way to do this through log4j i.e. to count the number of lines written inside a file and write the count value in the first line of file with time stamped separated by space.
Alternately,i will have to write another java program who will take files as input,read the files one by one,count the no of records/transactions contained in a single file and write duplicate file with number of count/lines in the first line and beneath the original content. But this process is not time and resource efficient. Kindly advise me the solution. Regards Kami -- View this message in context: http://old.nabble.com/Log4j-Count-the-number-of-record-with-timestamp-tp28011948p28011948.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org