avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [LogKit] public Hierarchy.getRootLogger()
Date Tue, 25 Sep 2001 17:44:28 GMT
On Tue, 25 Sep 2001 19:26, Sylvain Wallez wrote:
> > > > class MyCustomHierarchy extends Hierarchy
> > > > {
> > > > ...do your tricky stuff here...
> > > > }
> > >
> > > Won't help a lot : "tricky stuff" cannot access m_rootLogger which is
> > > private ;)
> >
> > thats why I made a protected accessor getRootLogger() ;)
>
> Doh ! I was focused on the missing "public getRootLogger" and forgot it
> already existed protected. Sorry !

;)

> > > > or maybe something else? Would any of them work?
> > >
> > > Hierarchy.setDefaultLogTargets(LogTarget[] targets) would solve this
> > > particular problem.
> >
> > thats easily doable.
>
> Since I need this one now, patch attached for Hierarchy and
> LogKitManager !

applied.

> I think a LogManager (or HierarchyManager ?) will be needed if we want
> to build sophisticated log management apps, since such apps will need
> detailed knowledge on Logger configurations which shouldn't be exposed
> to normal client code (such as getLogTargets). I'll try to send a
> proposal soon.

Sounds kool ;) Just FYI the way I originally wanted to do it was something 
like

Hierargy.getManager()

class LogManager
{
  setLogTargets( String name, LogTarget[] targets );
  LogTarget[] getLogTargets( String name );

  setPriority( String name, Priority );
  Priority getPriority( String name );

  ...insert other mutators/accessors here ...
}

I am not sure how valid that is now or even if it is still a good idea ;)

> > > - LogKitManager.getHierarchy()
> >
> > You could just cache this before it gets passed to Hierarchy object. Or
> > not? ie I would go
> >
> > Hierarchy h = new Hierarchy();
> > LogKitManager lkm = new DefaultLogKitManager( h );
> >
> > //Manage h here
> > manage( h );
>
> Won't be enough :
> - LogKitManager can create its own Hierarchy
> - I'd like to access the Hierarchy from a LogKitManageable (more
> precisely a Cocoon component).

Convinced me. Anyone else mind this ?

> > > - Logger.isPriorityInherited()
> >
> > works for me.
>
> Cool, but we won't need it if we have a HierarchyManager...

ok - wont add it just yet then ;)

>
> > > BTW, I wrote a LogTarget for Servidium's LogFactor5 (www.servidium.com)
> > > which is a payware swing-based log monitoring GUI. They claim to be
> > > logging toolkit independent (which they are), but only provide Log4J
> > > integration. Do you think this could go into Avalon CVS ?
> >
> > This can go in fine I think. The problem will be getting it compiled for
> > a release. If LogFactor5 has a demo version we can use that, otherwise we
> > will have to write stubs or get you to submit the .class files prior to a
> > release.
>
> I discovered today they've been acquired by another company. And since
> LogFactor5 isn't their main product, I don't know if they will continue
> supporting it. So maybe it's better to wait for now and see what will
> happen.

okays.

-- 
Cheers,

Pete

---------------------------------------------------------------
The difference between genius, and stupidity? Genius has limits
---------------------------------------------------------------

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


Mime
View raw message