I want to be able to set different Priorities and Formats for individual
threads.

Can I do this with a single Logger?  If not, how might a I proceed?  

I tried subclassing Thread and giving the subclass a Logger member, then
making a logging wrapper of sorts that gets the current thread and tries to
use the Logger in the subclassed thread, like this:

        public class MyThread extends Thread
        {
                public Category thisThreadsLogger;
                ...
        }
        
        public class Log
        {
                public static void debug (String strMsg)
                {
                        ((MyThread)
MyThread.currentThread()).thisThreadsLogger.debug (strMsg);
                }       
        }

But my "debug" method generates a ClassCastException when I try to cast the
Thread returned from "currentThread()"
 to a MyThread.

How should I be handling this?

Bill Rebey

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

Reply via email to