Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Log4j file appender not writing to file
Log4j file appender not writing to file [message #449041] Tue, 09 May 2006 08:16 Go to next message
Eclipse UserFriend
I've been using log4j in my rcp app and it works great during development with a
stdout logger but when i deploy the app and try to use a rolling file appender
nothing gets written to the log file. The file itself is created, but nothing
appears in it.

If i run the application using -debug then all the log4j calls generate output
at the command line, but I dont know how to make it work properly with a file.

I've read a lot of threads and there seems to be some suggestion that it is to
do with classloading, but I havent seen any solutions that show log4j writing to
a file in a deployed application.

Does anyone have this working or have any ideas about what to do?

thanks,

Martin
Re: Log4j file appender not writing to file [message #449095 is a reply to message #449041] Wed, 10 May 2006 08:19 Go to previous messageGo to next message
Eclipse UserFriend
Have a read of http://www.eclipsezone.com/articles/eclipse-vms/ which might help clear some stuff up. It's most likely that your logger isn't visible to the log4j classloader, so that's why you don't see the output. However, if the rolling file appender is part of the log4j bundle, that's not likely to be the issue.

If the rolling file appender is in a different bundle to the log4j, then you should ensure that the log4j bundle has a buddy policy and that the dependent bundle registers itself for classloading. I use log4j in the above linked article as an example of when you might want to do this.

Alex.
Re: Log4j file appender not writing to file [message #449120 is a reply to message #449095] Wed, 10 May 2006 12:34 Go to previous message
Eclipse UserFriend
Alex Blewitt wrote:
> Have a read of http://www.eclipsezone.com/articles/eclipse-vms/ which might help clear some stuff up.

great, i've got it working.

thanks for the article.

Martin.
Previous Topic:possible to use a view's secondary id in plugin.xml?
Next Topic:Perspective/View Help
Goto Forum:
  


Current Time: Sat Aug 30 23:16:53 EDT 2025

Powered by FUDForum. Page generated in 0.06569 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top