Closed GoogleCodeExporter closed 8 years ago
I've encountered this same problem before while testing issue 117. I know I've
changed the code to fix it, but I
never checked it in, and I can't find it sitting around. I like replacing the
formatter in the sense that it makes the
log output more predictable, but I'm mildly nervous about setting it globally,
even if we set it back in a finally
clause or tearDown method. I had changed the code to scan for the first colon
(":") instead of counting
characters.
Original comment by jl1615@gmail.com
on 7 Aug 2009 at 7:04
Hi,
I fully agree that messing with the logger is not clean.
Note that the code still replaces the FileHandler for the logger. As well, as
it log
level.
getFeedLogger() in com.google.enterprise.connector.pusher.DocPusher is
sensitive to
run-time modifications because it is public. DocPusherTest seems the only class
that
uses this method.
It seems a bit tricky to test logging behavior with exposing your Logger. A
colleague
suggested that code could changer the logging configuration during your unit
tests
using java.util.logging.LogManager and then reset the configuration back.
Cleaner (no
public logger), but more complex.
Regards,
Nicolas Bélisle
Constellio team
Original comment by nicolas....@gtempaccount.com
on 7 Aug 2009 at 3:13
I inadvertently fixed this in conjunction with the Issue 106 changes. The
format of the feed logs changed
slightly. Specifically, the XML feed record no longer starts on the first log
message line (the line with the LEVEL).
This change is already in the 2.0.x branch and released in 2.0.2. See r2229
The change will be added to the trunk shortly.
Original comment by Brett.Mi...@gmail.com
on 9 Sep 2009 at 8:46
Original comment by Brett.Mi...@gmail.com
on 9 Sep 2009 at 8:47
Fixed 01 October 2009 in revision r2257
Original comment by Brett.Mi...@gmail.com
on 6 Oct 2009 at 9:21
Original comment by jla...@google.com
on 9 Dec 2010 at 10:28
Original issue reported on code.google.com by
nicolas....@gtempaccount.com
on 4 Aug 2009 at 7:01Attachments: