Are you trying to reset the default logger repository? Once it is already there (a default one is set there by Log4j) you need the original Object reference that was used to set the logger repository in the first place. It is just a simple Object obj = new Object();. If you have a reference to that, then you can reset it. If not, you are kind of out of luck. You can use a repository selector to create a new logger repository and set that with your own guard.

Take a look at the following if you didn't follow what I just said:
http://qos.ch/containers/

Jake

At 12:20 PM 11/27/2002 +0100, you wrote:

hi all,
i've done some digging in the log4j source to try to find out what the
problem is, and i have some questions.

i have made an extension to log4j to provide additional levels, and i have
followed the examples provided with log4j.

what seems to happen is that when i try to get a Logger instance with my
own LoggerFactory, the factory is ignored because of a 'guard'. can anyone
explain how this works, and how i get around it?

sincerely
morten wilken


|---------+---------------------------->
| | "Morten Wilken" |
| | <Morten.Wilken@st|
| | eria.dk> |
| | |
| | 26-11-2002 14:37 |
| | Please respond to|
| | "Log4J Users |
| | List" |
| | |
|---------+---------------------------->

>--------------------------------------------------------------------------------------------------------------|
| |
| To: [EMAIL PROTECTED] |
| cc: |
| Subject: strange behaviour |

>--------------------------------------------------------------------------------------------------------------|




hi all,
we are in the process of integrating log4j in a weblogic 5.1 application.

we are using the propertyconfigurator and the configureAndWatch() to setup
watchdog , but we have obsered some strange behaviour.

if we specify a classname in a logger ie:

log4j.logger.com.domain.package.Class=debug

we get a ClassCastException when we try to use a class with logging in it.

however, if we set it to

log4j.logger.com.domain.package=debug

when we start, and later on change it to

log4j.logger.com.domain.package.Class=debug

it logs just fine.

is this a known error or has anybody expeirienced anything like it?

sincerely
morten wilken




--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>







--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to