Berin,

put it in framework.

You may want to look at my ConsoleLogger class that I sent to the list about
an hour ago...

/LS

> -----Original Message-----
> From: Berin Loritsch [mailto:[EMAIL PROTECTED]]
> Sent: den 6 februari 2002 17:29
> To: Avalon Developers List
> Subject: Re: PrimordialLogger?
>
>
> Berin Loritsch wrote:
>
> Oh, and one more question, should this go in Framework, or stay with the
> ContainerManager?
>
> > I have come to the conclusion that I need a PrimordialLogger for the
> > ContainerManager system.
> > The PrimordialLogger is used until whatever LoggerManager is used sets
> > up the system loggers.
> > This way I can have logging at all stages of the game, and avoid
> > infinite loops when trying
> > to set up the LoggerManager.
> >
> > The getLogger() method would be implemented in this fashion:
> >
> > ContainerManager()
> > {
> >     m_primordialLogger = new PrimordialLogger();
> > }
> >
> > Logger getLogger()
> > {
> >     if ( null != m_primordialLogger )
> >     {
> >         return m_primordialLogger;
> >     }
> >
> >     return getLoggerManager().getDefaultLogger();
> > }
> >
> > LoggerManager getLoggerManager()
> > {
> >     // do setup of LoggerManager
> >     m_primordialLogger = null;
> >     return m_loggerManager;
> > }
> >
> >
> > --------------------------------------------------------
> >
> > The PrimordialLogger would be implemented like this:
> >
> > public final class PrimordialLogger implements Logger
> > {
> >     public void debug( String message )
> >     {
> >         System.out.print("[DEBUG] ");
> >         System.out.println( message );
> >     }
> >     public void debug( String message, Throwable t )
> >     {
> >         debug( message );
> >         t.printStackTrace( System.out );
> >     }
> >     public boolean isDebugEnabled()
> >     {
> >         return true;
> >     }
> > }
> >
>
>
>
> --
>
> "They that give up essential liberty to obtain a little temporary safety
>   deserve neither liberty nor safety."
>                  - Benjamin Franklin
>
>
> --
> 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