logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Muller <mmul...@perfect.com>
Subject Class Resolving
Date Sat, 13 Apr 2002 01:22:44 GMT
	Long time developer with log4j (since the 0.9 days), first time
poster. An issue that I have stumbled across when using log4j with the 1.3
jdk is that you can't drop log4j.jar into a java extensions directory and
then use any custom pattern layouts or custom appenders that are found in
the regular class path due to security/classloader-weirdness issues. This
means that the log4j.jar must always be included in the main classpath when
custom appenders/pattern-layouts are used that also appear in the main
	The way that I have seen this handled with other packages (Ognl
comes to mind) is to have an interface say ClassResolver that will resolve
requests for loading classes. If the class resolver isn't set then the
regular forName method is used. This has the benefit of being able to put
log4j in the extensions directory and then set a ClassResolver object loaded
from the main classpath at startup which can resolve class for name requests
for both the main and extensions class loaders.

Any thoughts? 


ps - The only spot that I have found that would really be effected would be

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message