----- Original Message ----- From: "Eung-ju Park" <[EMAIL PROTECTED]> To: "Avalon Development" <[email protected]>; <[EMAIL PROTECTED]> Sent: Thursday, September 06, 2001 10:58 PM Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?
> ----- Original Message ----- > From: "Peter Donald" <[EMAIL PROTECTED]> > To: "Avalon Development" <[email protected]> > Sent: Thursday, September 06, 2001 10:33 PM > Subject: Re: DefaultLogKitManager not fit for Phoenix blocks? > > > > On Thu, 6 Sep 2001 22:57, Eung-ju Park wrote: > > > Hi. > > > > > > I hack DefaultApplicationFrame for excalibur LogKitManager. > > > But have one problem. > > > > > > I must specify category for each blocks because DefaultLogKitManager > does > > > not provide default category. :-( > > > > > > How do I provide default category? > > > > > > My change attached. cvs version of excalibur and logkit needed. > > > > does > > > > <category name="" log-level="INFO"> > > <log-target id-ref="root"/> > > </category> > > > > work ??? > > It not works. > I see the DefaultLogKitManager sources. need work. :-). but I'm have no > idea. is below diff correct solution? (stolen from current phoenix :-) I works for me. Index: DefaultLogKitManager.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logg er/DefaultLogKitManager.java,v retrieving revision 1.2 diff -u -r1.2 DefaultLogKitManager.java --- DefaultLogKitManager.java 2001/09/06 13:25:14 1.2 +++ DefaultLogKitManager.java 2001/09/06 14:14:12 @@ -203,6 +203,12 @@ { final String id = targets[j].getAttribute( "id-ref" ); log_targets[j] = targetManager.getLogTarget( id ); + + if ( "".equals( category ) ) + { + m_hierarchy.setDefaultPriority( Priority.getPriorityForName( loglevel ) ); + m_hierarchy.setDefaultLogTarget( log_targets[ j ] ); + } } final String full_category; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
