Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed1.swip.net!newsfeed2.funet.fi!newsfeeds.funet.fi!fi.sn.net!newsfeed1.tdcnet.fi!news.song.fi!not-for-mail Date: Thu, 05 Jan 2012 11:28:28 +0200 From: Donkey Hottie User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Logging Question References: <9102298.933.1325372035497.JavaMail.geo-discussion-forums@prj1> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 120104-1, 04.01.2012), Outbound message X-Antivirus-Status: Clean Message-ID: <0v6gt8-765.ln1@hurricane.fredriksson.dy.fi> Lines: 14 Organization: NBL Networks Oy NNTP-Posting-Host: 213.157.94.92 X-Trace: 1325755925 news.nbl.fi 2773 213.157.94.92:33004 X-Complaints-To: abuse@nblnetworks.fi Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11076 5.1.2012 2:28, Arved Sandstrom kirjoitti: > One thing that works with stream parsing is to fool the parser with a > fake starting document element tag...like . :-) Given that, SAX or > StAX will parse forever, or until end of file/stream anyway. The Stream can be a StringStream. I once implemented a logging system, which did read the data from file into individual Strings and passed those to SAX. The implementation wrote the log files with out a root element, and once a day it "logrotated", and added the root element to the daily log for completeness. -- Increased knowledge will help you now. Have mate's phone bugged.