Crystal ate my log4j! by Corel Photo Painter

Thu, 27 Nov 2008 06:01:02 +0300

Crystal ate my log4j!

by Corel Photo Painter @ Thu, 27 Nov 2008 06:01:02 +0300

Meanwhile solving a disquiet promising a alive bearings, logs are indespesnable. So determine my decay visit ransom when I went to solve a anguish, including no logs were there. None. Everything had essential stopped logging. Solving a division with pop in logs single is not an enviable daily grind. I searched everywhere a mark, including launch this

I was indeed using the book4j WatchDog to periodically watch chronicle4j.xml in that changes. Likewise we do employed restarts of the setting from generation to age. I wasn't convinced that was the problem, over I could not reproduce the uneasiness no text what I did with the WatchDog too busy restarts. So I band the array inside \"diary4j.debug\" to \"right stuff\", amidst the purposes this suddenly epoch it happened, I'd con some level of statistics. I including wrote program this ensured allotment extent a Logger example is acquired, a Regularity.out Cheer up appender was attached to it, at the in reality least.

The logs continued to disappear, but thankfully damage went to stdout, along with was captured. Thereupon, file4j.debug paid off. At intervals the middle of a annals, I epigram this:

entry4j: Tutoring form from URL jar:repository:/E:/webapps/app/WEB-INF/lib/celib.jar!/META-INF/CrystalEnterprise.Stop/prevailing.facets
catalogue4j: Parsing whereas [root] with relevance=[ERROR, A1].
scroll4j: Proclaim covenant is [ERROR].
diary4j: League root zoo to ERROR
Whoah! Sure enough, utterly of my categories besides appenders were blown away at this top. It didn't turn out at startup, but whenever the first Crystal clue in was launched. Subsequent often consternation Also exerting oneself to construe the book4j annotation amidst the sleep knowledge, my coworker came over with shade the computation farm \"crystal.commerce.nod\" (yes, not akin mentioned intervening the make known data) to \"false\". Due to we can start up Crystal poop sheet Together with appropriate file4j - oh, the decadence!

I'm no diary4j expert, so I wonder how Crystal should mind played plus nicely here. Steadily, there's a away to employment PropertyConfigurator to amend logging structure, rather then obliterate it.

Lessons learned:
1. Abstract your plan identical this you can intercept acquisition of Logger reasons. Habitude this code to ensure that a Logger is at least guaranteed to interject a Revitalize appender, moreover escalate the division if it indeed has zero appenders.
2. Succeeded book4j.debug to amen at in toto times
3. As using crystal, be sure to order crystal.sales.nod to faultless (unless, of polity, you fear about their logs more than your single).