Trenton D. Adams wrote:
What's the quickest and easiest way of my code knowing what class called
a method? The reason I ask is because we have some wrapper methods in
our main class that every other class calls to do logging. I would like
that method to be able to determine what class it was
Ok, is there a way of my wrapper class starting up, and automatically
detecting all the classes available in every package I specify, and then
setting up loggers for each one? I mean an easy way. I could just
search through all the files, and convert them to class names without
the '/' or
Trenton D. Adams wrote:
Ok, is there a way of my wrapper class starting up, and automatically
detecting all the classes available in every package I specify, and
then setting up loggers for each one? I mean an easy way. I could
just search through all the files, and convert them to class
Thanks for the suggestions. Keep reading...
Thorbjørn Ravn Andersen wrote:
Trenton D. Adams wrote:
Ok, is there a way of my wrapper class starting up, and automatically
detecting all the classes available in every package I specify, and
then setting up loggers for each one? I mean an easy way.
Ok, this is slightly off topic for this list then. But I'd appreciate
any help.
What's the quickest and easiest way of my code knowing what class called
a method? The reason I ask is because we have some wrapper methods in
our main class that every other class calls to do logging. I would
ex) {
return Unknown method.;
}
}
Michael Scovetta
Computer Associates
Senior Application Developer
-Original Message-
From: Trenton D. Adams [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 29, 2005 11:58 AM
To: Jakarta Commons Users List
Subject: Re: commons logging class
Users List
Subject: RE: commons logging class level logging
Trenton,
I'm working on project to do add method-level authorization to Java
(actually, it's just a simple class, but it's pretty cool)-- Anyway, at
the heart of it is a method:
Play with it a little, I believe if you have
public class
Hello!
Use a private final static Log member in your classes. That way the
logging object is created at startup and thus you no longer have to
spend time for it.
What's the quickest and easiest way of my code knowing what class
called a method?
If you use log4j you could configure the pattern
Scovetta, Michael V wrote:
(new Throwable()).printStackTrace(pw);
Depending on your JVM this might be extremely slow. Additionally the
log4j people (who uses this method too) have found that some JIT's give
incorrect stack traces.
Java 1.5 is rumoured to have much better facilities
Trenton D. Adams trenta at athabascau.ca writes:
I thought I read somewhere that JCL allows one to turn on/off debug
logging based on the package or class name. Is that right? I'm looking
on the JCL website, but can't find information on that. Perhaps that's
because I don't know what
On Thu, 2005-03-24 at 13:42 -0700, Trenton D. Adams wrote:
I thought I read somewhere that JCL allows one to turn on/off debug
logging based on the package or class name. Is that right? I'm looking
on the JCL website, but can't find information on that. Perhaps that's
because I don't
On Thu, 24 Mar 2005 13:42:04 -0700, Trenton D. Adams
[EMAIL PROTECTED] wrote:
I thought I read somewhere that JCL allows one to turn on/off debug
logging based on the package or class name. Is that right? I'm looking
on the JCL website, but can't find information on that. Perhaps that's
12 matches
Mail list logo