You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Eung-ju Park <co...@isoft.co.kr> on 2001/09/06 14:57:34 UTC

DefaultLogKitManager not fit for Phoenix blocks?

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.


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Peter Donald <do...@apache.org>.
On Tue, 11 Sep 2001 22:19, Eung-ju Park wrote:
> I have done compatibility layer.
> commit?

go for it !


>
> ----- Original Message -----
> From: "Mircea Toma" <mi...@home.com>
> To: "Avalon Development" <av...@jakarta.apache.org>;
> <do...@apache.org>
> Sent: Sunday, September 09, 2001 3:22 AM
> Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?
>
> > ----- Original Message -----
> > From: "Peter Donald" <do...@apache.org>
> > To: "Avalon Development" <av...@jakarta.apache.org>
> > Sent: Friday, September 07, 2001 11:49 PM
> > Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?
> >
> > > Hi,
> > >
> > > I haven't had a good look at it yet but yours and Eung-ju work didn't
>
> look
>
> > to
> >
> > > be backwards compatible. I was thinking that I don't really want to
>
> break
>
> > > backwards compatibility yet (not before we change from alpha->beta for
> > > Phoenix) so maybe we can deprecate the old version and add a new
> > > element
> >
> > name
> >
> > > <logging/> ??
> >
> > -0
> >
> > > or attribute <logs version="1.1" /> ???
> >
> > +1
> >
> > > that marks one logging
> > > system as being the "new one" and one as being the old style. Thoughts?
> >
> > ... we can provide a XSLT transformation too (as Ant target), for a
>
> smoother
>
> > transition!
> >
> > Mircea
> >
> > > On Fri, 7 Sep 2001 14:50, Mircea Toma wrote:
> > > > Here is the diff for DefaultApplicationFrame that uses
> > > > DefaultLogKitManager. The server.xml (<logs>) configuration should be
> > > > changed accordingly. I guess I can change the DefaultEmbeddor to use
>
> the
>
> > > > DefaultLogKitManager  too ("TODO: allow configurable priorities and
> > > > multiple logtargets").
> > >
> > > --
> > > Cheers,
> > >
> > > Pete
> > >
> > > --------------------------------------------------
> > >  The fact that nobody understands you doesn't
> > >  mean you're an artist.
> > > --------------------------------------------------
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

-- 
Cheers,

Pete

*--------------------------------------------------*
| Wise men don't need advice. Fools don't take it. |
|              -Benjamin Franklin                  |
*--------------------------------------------------*

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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Eung-ju Park <co...@isoft.co.kr>.
I have done compatibility layer.
commit?

----- Original Message -----
From: "Mircea Toma" <mi...@home.com>
To: "Avalon Development" <av...@jakarta.apache.org>;
<do...@apache.org>
Sent: Sunday, September 09, 2001 3:22 AM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


>
> ----- Original Message -----
> From: "Peter Donald" <do...@apache.org>
> To: "Avalon Development" <av...@jakarta.apache.org>
> Sent: Friday, September 07, 2001 11:49 PM
> Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?
>
>
> > Hi,
> >
> > I haven't had a good look at it yet but yours and Eung-ju work didn't
look
> to
> > be backwards compatible. I was thinking that I don't really want to
break
> > backwards compatibility yet (not before we change from alpha->beta for
> > Phoenix) so maybe we can deprecate the old version and add a new element
> name
> > <logging/> ??
>
> -0
>
> > or attribute <logs version="1.1" /> ???
>
> +1
>
> > that marks one logging
> > system as being the "new one" and one as being the old style. Thoughts?
>
> ... we can provide a XSLT transformation too (as Ant target), for a
smoother
> transition!
>
> Mircea
>
> >
> > On Fri, 7 Sep 2001 14:50, Mircea Toma wrote:
> > > Here is the diff for DefaultApplicationFrame that uses
> > > DefaultLogKitManager. The server.xml (<logs>) configuration should be
> > > changed accordingly. I guess I can change the DefaultEmbeddor to use
the
> > > DefaultLogKitManager  too ("TODO: allow configurable priorities and
> > > multiple logtargets").
> >
> > --
> > Cheers,
> >
> > Pete
> >
> > --------------------------------------------------
> >  The fact that nobody understands you doesn't
> >  mean you're an artist.
> > --------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
>


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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Mircea Toma <mi...@home.com>.
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Friday, September 07, 2001 11:49 PM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


> Hi,
>
> I haven't had a good look at it yet but yours and Eung-ju work didn't look
to
> be backwards compatible. I was thinking that I don't really want to break
> backwards compatibility yet (not before we change from alpha->beta for
> Phoenix) so maybe we can deprecate the old version and add a new element
name
> <logging/> ??

-0

> or attribute <logs version="1.1" /> ???

+1

> that marks one logging
> system as being the "new one" and one as being the old style. Thoughts?

... we can provide a XSLT transformation too (as Ant target), for a smoother
transition!

Mircea

>
> On Fri, 7 Sep 2001 14:50, Mircea Toma wrote:
> > Here is the diff for DefaultApplicationFrame that uses
> > DefaultLogKitManager. The server.xml (<logs>) configuration should be
> > changed accordingly. I guess I can change the DefaultEmbeddor to use the
> > DefaultLogKitManager  too ("TODO: allow configurable priorities and
> > multiple logtargets").
>
> --
> Cheers,
>
> Pete
>
> --------------------------------------------------
>  The fact that nobody understands you doesn't
>  mean you're an artist.
> --------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>


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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Eung-ju Park <co...@isoft.co.kr>.
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Saturday, September 08, 2001 2:49 PM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


> Hi,
>
> I haven't had a good look at it yet but yours and Eung-ju work didn't look
to
> be backwards compatible. I was thinking that I don't really want to break
> backwards compatibility yet (not before we change from alpha->beta for
> Phoenix) so maybe we can deprecate the old version and add a new element
name
> <logging/> ?? or attribute <logs version="1.1" /> ??? that marks one
logging
> system as being the "new one" and one as being the old style. Thoughts?

Yes. backwards compatibility is important.
I think <logs version="1.1"> style is better.


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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Peter Donald <do...@apache.org>.
Hi,

I haven't had a good look at it yet but yours and Eung-ju work didn't look to 
be backwards compatible. I was thinking that I don't really want to break 
backwards compatibility yet (not before we change from alpha->beta for 
Phoenix) so maybe we can deprecate the old version and add a new element name 
<logging/> ?? or attribute <logs version="1.1" /> ??? that marks one logging 
system as being the "new one" and one as being the old style. Thoughts?

On Fri, 7 Sep 2001 14:50, Mircea Toma wrote:
> Here is the diff for DefaultApplicationFrame that uses
> DefaultLogKitManager. The server.xml (<logs>) configuration should be
> changed accordingly. I guess I can change the DefaultEmbeddor to use the
> DefaultLogKitManager  too ("TODO: allow configurable priorities and
> multiple logtargets").

-- 
Cheers,

Pete

--------------------------------------------------
 The fact that nobody understands you doesn't 
 mean you're an artist.
--------------------------------------------------

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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Mircea Toma <mi...@calgary.qcdata.com>.
I'm using DefaultLogKitManager  in a different  project and it works
properly. You just need a target for your root category ( root category ==
"") :

<category name="" log-level="INFO">
  <log-target id-ref="root"/>
</category>

... the above configuration works for me!

Mircea




----- Original Message -----
From: "Eung-ju Park" <co...@isoft.co.kr>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Friday, September 07, 2001 12:36 AM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


>
> ----- Original Message -----
> From: "Mircea Toma" <mi...@home.com>
> To: "Avalon Development" <av...@jakarta.apache.org>
> Sent: Friday, September 07, 2001 1:50 PM
> Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?
>
>
> > Hi,
> >
> > Here is the diff for DefaultApplicationFrame that uses
> DefaultLogKitManager.
> > The server.xml (<logs>) configuration should be changed accordingly. I
> guess
> > I can change the DefaultEmbeddor to use the DefaultLogKitManager  too
> > ("TODO: allow configurable priorities and multiple logtargets").
> >
> > Mircea
>
> I think using LogKitManager in Embeddor is not necessary.
> It so complex for embeddor.
> Embeddor write very small amount of logs.
>
> Your patch is very similar to mine. May be It have same problem( absence
of
> default category ).
> I think need to fix DefaultLogKitManager for solve problem. I writen patch
> for DefaultLogKitManager( see past my posting ). but I don't know it is
> correct patch. ;-)
>
> PS. Peter. Is acceptable 'DefaultApplicationFrame that use LogKitManager'?
> I will commit patch for DefaultLogKitManager, DefaultApplicationFrame, and
> cornerstone server configuration If it is acceptable.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
>


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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Eung-ju Park <co...@isoft.co.kr>.
----- Original Message -----
From: "Mircea Toma" <mi...@home.com>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Friday, September 07, 2001 1:50 PM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


> Hi,
>
> Here is the diff for DefaultApplicationFrame that uses
DefaultLogKitManager.
> The server.xml (<logs>) configuration should be changed accordingly. I
guess
> I can change the DefaultEmbeddor to use the DefaultLogKitManager  too
> ("TODO: allow configurable priorities and multiple logtargets").
>
> Mircea

I think using LogKitManager in Embeddor is not necessary.
It so complex for embeddor.
Embeddor write very small amount of logs.

Your patch is very similar to mine. May be It have same problem( absence of
default category ).
I think need to fix DefaultLogKitManager for solve problem. I writen patch
for DefaultLogKitManager( see past my posting ). but I don't know it is
correct patch. ;-)

PS. Peter. Is acceptable 'DefaultApplicationFrame that use LogKitManager'?
I will commit patch for DefaultLogKitManager, DefaultApplicationFrame, and
cornerstone server configuration If it is acceptable.


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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Mircea Toma <mi...@home.com>.
Hi,

Here is the diff for DefaultApplicationFrame that uses DefaultLogKitManager.
The server.xml (<logs>) configuration should be changed accordingly. I guess
I can change the DefaultEmbeddor to use the DefaultLogKitManager  too
("TODO: allow configurable priorities and multiple logtargets").

Mircea

----- Original Message -----
From: "Eung-ju Park" <co...@isoft.co.kr>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Thursday, September 06, 2001 8:22 AM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


> ----- Original Message -----
> From: "Eung-ju Park" <co...@isoft.co.kr>
> To: "Avalon Development" <av...@jakarta.apache.org>;
> <do...@apache.org>
> Sent: Thursday, September 06, 2001 10:58 PM
> Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?
>
>
> > ----- Original Message -----
> > From: "Peter Donald" <do...@apache.org>
> > To: "Avalon Development" <av...@jakarta.apache.org>
> > 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: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>

Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Eung-ju Park <co...@isoft.co.kr>.
----- Original Message -----
From: "Eung-ju Park" <co...@isoft.co.kr>
To: "Avalon Development" <av...@jakarta.apache.org>;
<do...@apache.org>
Sent: Thursday, September 06, 2001 10:58 PM
Subject: Re: DefaultLogKitManager not fit for Phoenix blocks?


> ----- Original Message -----
> From: "Peter Donald" <do...@apache.org>
> To: "Avalon Development" <av...@jakarta.apache.org>
> 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: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Eung-ju Park <co...@isoft.co.kr>.
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
To: "Avalon Development" <av...@jakarta.apache.org>
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.

>
> --
> Cheers,
>
> Pete
>
> *---------------------------------------------------------*
> | Programming today is a race between software engineers  |
> | striving to build bigger and better idiot-proof         |
> | programs,and the universe trying to produce bigger and  |
> | better idiots. So far, the universe is winning.         |
> |                       - Richard Cook                    |
> *---------------------------------------------------------*
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
>


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


Re: DefaultLogKitManager not fit for Phoenix blocks?

Posted by Peter Donald <do...@apache.org>.
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 ???

-- 
Cheers,

Pete

*---------------------------------------------------------*
| Programming today is a race between software engineers  |
| striving to build bigger and better idiot-proof         |
| programs,and the universe trying to produce bigger and  |
| better idiots. So far, the universe is winning.         |
|                       - Richard Cook                    |
*---------------------------------------------------------*

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