RE: Question about Log4j and ObjectRepositoryAssembler

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi Christian,

I'm attaching my logging output and a copy of log4j.xml that you should 
use.  Note that the only difference is that it specifies the file appender 
in the root logger and doesn't specify a <level> in individual appenders 
when the only thing they are doing is <level name="warn"/>.  That is 
redundant.  I have the <level> set to "debug" for the object repository 
assembler like you had in the copy of log4j.xml that you attached to the 
last email.  Try this log4j.xml and see if it works for you.  If this works 
and yours doesn't, I'll have to think about why that is.   Don't have much 
time to think about it now, though.

As you can see, the logging sent to stdout.log and main.log are identical 
and only servlet startup information is sent to the Barracuda servlet 
log.  I'm at a loss if your experience doesn't match up with this.  Note, I 
install Barracuda using:
ant catalina-install

...but the way you install Barracuda should make no difference.

BTW, I am using Tomcat-4.1.24.  I suggest an upgrade.  4.1.12 is quite old 
and buggy.  I also use Tomcat5 (latest nightly) and it works fine as well.

I am going to be out until Sunday, so I won't be able to address this 
anymore until then.  Hopefully the information I've given you has helped.

later,

Jake

At 09:30 AM 8/8/2003 -0600, you wrote:
>Hi Jake,
>
> > Tomcat's logs?  Which ones?  The ones I'd expect to seem some logging in
> > (hint, not all of it is log4j logging):
>
>So I launch Tomcat (console mode) and the object repository logging (plus
>whatever logging gets triggered by things being assembled via the object
>repository) shows up here:
>
>localhost_log.2003-08-08.txt
>
> > Note that the following line is not part of Log4j logging:
> > Configuring GlobalOR from File: WEB-INF/object-repository.xml
>
>Yes, I understand that. The logging I am seeing is debug stuff from
>ObjectRepositoryAssembler.
>
> > Nope.  Servlet context listeners are guaranteed to run before any servlet
> > runs.  That is one of the main reasons why we moved away from the
> > Log4jInit servlet.  It is a much better facility for application
> > pre-configuration in servlet-2.3+ than servlets are.
>
>Ok, so that's good to know.
>
> > Hmm..... you say log4j.properties?  Not log4j.xml?
>
>Sorry, I meant log4j.xml. I don't think that's the issue, but I'll attach a
>copy of the one I use in Barracuda, just in case you find it helpful.
>
> > Are you saying this happens for Barracuda or one of your apps
> > using Barracuda libraries?
>
>Both. Just configure ObjectRepositoryAssembler logging to debug (like
>attached file), and restart Tomcat manually...you won't see any logging in
>the console, although subsequent log4j logging (once everything is up and
>running) DOES show in the console. This is the key point of my problem -
>initial obj repos logging goes to the log, but subsequent logging goes to
>the console as it should. That's what's so weird.
>
> > Alright, I just tested running Tomcat from the console.  Same
> > result.  Identical logging information from log4j goes to both
> > the console and the main.log
>
>Ok...but what I'm saying is that for me I _don't_ get the object repository
>logging going to the console when I run Tomcat directly, and I know I used
>to.
>
>What version of Tomcat are you using? I'm using Tomcat 4.1.12. Maybe that is
>part of the problem... ideas? Suggestions?
>
>tia,
>Christian
>
> > >----------------------------------------------
> > >Christian Cryder
> > >Internet Architect, ATMReports.com
> > >Project Chair, BarracudaMVC - http://barracudamvc.org
> > >----------------------------------------------
> > >"Coffee? I could quit anytime, just not today"
log4j_output.zip (application/zip, 7.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.