WorldWander logo
Main

The Road Behind

Venezuela
Trinidad
Curacao
Galapagos
Ecuador
Peru
Bolivia
Paraguay
Argentina
Chile
Hong Kong
Thailand North
Thailand South
Malaysia
Cambodia
Singapore
Nepal
Kathmandu
Royal Trek
Nepal Trek
India
India Palace
Udaipur
Bangalore
Greece
Islands
Rhodes
Camping
Olympia
Turkey
Istanbul
Bath
Bursa
Cappadocia
Bodrum
South Africa
Garden Route
Cape Town
Namibia
Fish River
Etosha
Botswana
Zimbabwe
Wedding
Great Ruins
Germany
Bathroom
Netherlands
Spain
Madrid
Seville
Granada
Gibraltar
Morocco
Portugal
Sintra
France
Normandy
Egypt
Pyramids
Nile
Aswan
Abusimbel
Luxor
Valley of Kings
Alexandria
Red Sea
Jordan
Kings Valley
Aman
Palestine

The Road Ahead

Isreal
Czech Republic
Austria
Italy
Switzerland
England
Find pages
Unused pages
Undefined pages
Page Index

Set your name in
UserPreferences


Referenced by
JSPWikiFAQ




JSPWiki v2.2.33


FAQLogging


Logging

Log4j Problem

Q: I installed jspwiki and everything seems to work fine. But I actually have a problem with log4j The entries in the local jspwiki.properties don't seem to work. To be shure I removed the system wide log4j and its property file. This was also another version, 1.2.8. Then I started Tomcat again. No log file was created. Used existing path without typo. The following message was to be found in launcher.server.log:

log4j:ERROR No appenders could be found for category (com.ecyrd.jspwiki.WikiEngine). log4j:ERROR Please initialize the log4j system properly.

The log4j lines in

jspwiki.properties log4j.appender.FileLog = org.apache.log4j.RollingFileAppender log4j.appender.FileLog.MaxFileSize = 10MB log4j.appender.FileLog.MaxBackupIndex = 14 log4j.appender.FileLog.File = d:\\webapps\\jspwiki\\_log\\jspwiki.log log4j.appender.FileLog.layout = org.apache.log4j.PatternLayout log4j.appender.FileLog.layout.ConversionPattern=%d [%t] %p %c %x - %m%n

everything else concerning log4j in jspwiki.properties is commented out. Have you got any idea, please?

After installing, I found that the first line was "log4j.appender.filelog...". Note the lowercase f and l in filelog. Also, a few lines below the appender block you should have a line starting as "log4j.rootCategory=INFO,FileLog". The FileLog should be the same as it is for the above appender lines. This resolved the problem, you mention, for me.

--JasonWester

Log4j DNS lookups taking lots of time

Some time below, somebody complained about a terribly slowly running JSPWiki - I ran into a similar situation: after having successfully installed JSPWiki 1.8.2 within a LiteWebserver I observed long delays between an HTTP request and the corresponding response from the server (30 seconds and more) - surprisingly, the whole(!) server was blocked during that time, i.e., concurrent requests with other URIs (I'm using that server for a HTML wrapping facility based on servlets which I wrote myself) did not proceed as well!

I then figured out, that the delay might have been caused by problems with DNS lookups (the method HttpRequest.getRemoteHost took very long to complete) and switching off DNS immediately solved the problem.

Consequence: you may not have to switch off DNS resolution yourself (I just used this to verify my assumption), but you may want to change your DNS servers or help your system with a local "hosts" file...

Hoping that this remark is of any help...

--Andreas Rozek

You may be right. There should be an option to disable DNS queries (which incidentally, are currently only used by the logging routines. Duh. Perhaps I should just disable them completely.)

--JanneJalkanen

Hmmm, can I disable logging by log4j somehow? This package was the one which caused most of the trouble when installing JSPWiki on my LiteWebServer...

--Andreas Rozek

Simple: Look at the jspwiki.properties, right at the end. Comment out anything that has anything to do log4j, and you should be set. Unfortunately, since string concatenation is done before the logging, you'll still get the DNS resolution. Easiest is to remove the offending statements from the JSP pages.

--JanneJalkanen




Go to top  
This page last changed on 16-May-2005 22:57:18 EDT by unknown.
Please make one.