logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean.Br...@ubitrade.com.au
Subject Default initialisation in Applets
Date Thu, 04 Oct 2001 23:16:55 GMT
Dear fellow Log4j users,

Consider that I have a set of java classes in separate packages, all jar'ed
and sent to
a browser client as part of an applet (indeed the applet itself has such
logging code in it) or
some of the same classes are used as part of a servlet.

Here's a snippet of the logger code required, other than this I simply do
my logging calls
inline such as ........ cat.debug("my message")  etc
    import org.apache.log4j.Category;

    // Logging
    static Category cat = Category.getInstance(MyExampleClass.class.getName


OK, so in the case of the servlet, the log4j.properties file is used for
default initialisation, and it works
so I can happily use my Category instance for logging....

HOWEVER, consider that when I first attempt to use my Swing applet, the JRE
and plugin is installed, and
I have a fresh environment within which my applet should run. My problem
now is how can default initialisation
work WITHOUT any intervention on the client side. I have seen questions on
this topic that involve classpath/copying files locally
and/or relaxing Java security constraints  .... but putting it simply if I
have a windows 2000 box
with a fresh installation, and I browse for my applet, how can I make sure
that the attempts at default initialisation
will not cause an exception, and kill my applet ....

Sorry, if this a silly question, but the doco is not clear (well at least
to me) on this issue.


Dean Brown

To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message