You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Tim Colson <tc...@cisco.com> on 2003/11/09 21:21:49 UTC

RE: logging?

Somebody wrote:
> > If the option of "just use Log4J directly in Velocity" was 
> > on the table,  I wouldn't complain.  
> > But I suspect a lot of other people would....

I wouldn't complain either. :-)

But then, I can also see that if folks decide to use JDK 1.4 logging,
they wouldn't be happy if Velocity mandated log4j.

So I guess I see the 'need' for a wrapper like C-L... and I agree with
Nathan that C-L and LogSystem seem to be in the same 'problem space' -
and of those, I'd vote for C-L. 

Geir made a point that C-L can't track logger specific changes as
quickly as self-maintained LogSystem... but I think that sounds a bit
like laziness. <grin>

 I mean, C-L is open source too - so missing feature patches can be sent
to the C-L team. 

Timo


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


Re: logging?

Posted by Nathan Bubna <na...@esha.com>.
Tim Colson said:
> Geir said:
...
> > You can't fix the usage pattern, though.  I've tried...
> I don't claim a deep understanding...but on the surface I'm seeing
> LogSystem and C-L as similar beasts, similar usage. So long as I can
> write logThingy.error("Boom!") - I'm pretty happy. Albeit, I'd want
> Nested Diagnostic Contexts from log4j too... they are quite nice for
> pushing the session ID into every log mesg from a servlet.)

if Velocity switched from LogSystem to c-l, there still wouldn't be a darned
thing stopping you from using NDC in your app.  see, you may need fancy stuff
like that, but Velocity itself doesn't.  c-l has all the features i can ever
imagine Velocity needing.  (it certainly has more than LogSystem!!).  so, if
Velocity uses c-l, then you just point c-l to use log4j (which your code uses
directly), and everyone is happy!

well, except Geir, who feels we should have to configure logging separately
for each and every component/library in our applications.  ;)

Nathan Bubna
nathan@esha.com


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


Re: logging?

Posted by Nathan Bubna <na...@esha.com>.
Geir Magnusson Jr. said:
> On Sunday, November 9, 2003, at 06:25 PM, Nathan Bubna wrote:
> > Geir Magnusson Jr. said:
...
> >> I'll say again that I think that C-L has it's place, and is actually
> >> really nice for some things.  But not everything.  I think we should
> >> support it - make sure that c-l users can just hook velocity in.
> >
> > who are these "c-l users" of whom you speak?  c-l is for components,
> > not applications.
>
> You have to be aware of it in your app if you hope to get control of
> the log output, right?

yep, but ("aware" != "using") && ("aware" + "configure" < "using")

i know i'm a perfectionist and all, but seriously, language has meaning and
the terms we use make a difference.

> >> But as to dedicating our lives to it?  :)  I don't want to rekindle
> >> this
> >> right now - I still have to do my homework.
> > ...
> >
> > me too.  i've got a big fat Greek translation calling my name.  i'm
> > using this to procrastinate. :)
>
> Are you still in divinity school?

yeah, about half-time these days.  and at this rate, i'll be answering yes to
that question for years to come.   :)

Nathan Bubna
nathan@esha.com


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


Re: logging?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Sunday, November 9, 2003, at 06:25 PM, Nathan Bubna wrote:

> Geir Magnusson Jr. said:
>> Oh, I so dread revisiting this tonight - I'd been planning to relax
>> this weekend after coming back from mirror-world....
>
> heh.  yeah, i wasn't thrilled to see this again either. :)
>
> ...
>> I'll say again that I think that C-L has it's place, and is actually
>> really nice for some things.  But not everything.  I think we should
>> support it - make sure that c-l users can just hook velocity in.
>
> who are these "c-l users" of whom you speak?  c-l is for components, 
> not
> applications.

You have to be aware of it in your app if you hope to get control of 
the log output, right?

>
>> But as to dedicating our lives to it?  :)  I don't want to rekindle 
>> this
>> right now - I still have to do my homework.
> ...
>
> me too.  i've got a big fat Greek translation calling my name.  i'm 
> using this
> to procrastinate. :)

Are you still in divinity school?

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: logging?

Posted by Nathan Bubna <na...@esha.com>.
Geir Magnusson Jr. said:
> Oh, I so dread revisiting this tonight - I'd been planning to relax
> this weekend after coming back from mirror-world....

heh.  yeah, i wasn't thrilled to see this again either. :)

...
> I'll say again that I think that C-L has it's place, and is actually
> really nice for some things.  But not everything.  I think we should
> support it - make sure that c-l users can just hook velocity in.

who are these "c-l users" of whom you speak?  c-l is for components, not
applications.

> But as to dedicating our lives to it?  :)  I don't want to rekindle this
> right now - I still have to do my homework.
...

me too.  i've got a big fat Greek translation calling my name.  i'm using this
to procrastinate. :)

Nathan Bubna
nathan@esha.com


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


Re: logging?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Sunday, November 9, 2003, at 06:04 PM, Tim Colson wrote:

>> Oh, I so dread revisiting this tonight
> Ha :-)
>
>> Why not?  Log4j 'appenders' could log to anything.  DBs.  Syslog.
>> legacy log systems.  Gerbils.  Why not jdk1.4?  I keep goading Ceki
>> about this, but he hasn't bitten yet :)
> I truly think a JDK1.4 Appender is a grand idea.
> But would there be a serious performance degredation using Gerbils?

If you thought that Gerbils were the way to go, who are we to say?  
It's probably a performance improvement over Hamsters.

>
> Tim crafted:
>>> (Although after reading a bit closer to see that these are just
>>> constants in a range from Integer.MIN to Integer.Max, I can
>> almost kind
>>> of sorta like the flexibility that could afford.)
>
> To which Geir replied:
>> ?
>
> Tim instantly understood this to mean Geir didn't understand what the
> heck Tim meant.
>
> http://www.ftponline.com/javapro/2002_06/magazine/features/shalloway/
>
> JavaPro article - Table 1 (link broken in the article) shows:
> Level.ALL  == Integer.MAX_VALUE
> Level.SEVERE == 1000
> Level.WARNING == 900
> Level.INFO == 800
> Level.CONFIG == 700
> Level.FINE == 500
> Level.FINER == 400
> Level.FINEST == 300
> Level.ALL == Integer.MIN_VALUE
>
> So the Levels are really just convenient integers... so I guess I could
> write:
>
> myLogger.log(200, "This is Supa-Fine, Baby!");
>
> Interesting. Not necessarily useful. But interesting. ;-)
>

That would be sensical, except that they have fine(), finer() and 
finest()  as methods.  I also assume MIN_VALUE = none?


>> I don't want to rekindle this
>> right now - I still have to do my homework.
> Hah, apologies for bringing this up again... I would have jumped on 
> when
> the thread started, but I was probably in Barcelona at the time. :-)
>
> Cheers,
> Timo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


RE: logging?

Posted by Tim Colson <tc...@cisco.com>.
> Oh, I so dread revisiting this tonight 
Ha :-)

> Why not?  Log4j 'appenders' could log to anything.  DBs.  Syslog. 
> legacy log systems.  Gerbils.  Why not jdk1.4?  I keep goading Ceki 
> about this, but he hasn't bitten yet :)
I truly think a JDK1.4 Appender is a grand idea. 
But would there be a serious performance degredation using Gerbils? 

Tim crafted:
> > (Although after reading a bit closer to see that these are just
> > constants in a range from Integer.MIN to Integer.Max, I can 
> almost kind
> > of sorta like the flexibility that could afford.)

To which Geir replied:
> ?

Tim instantly understood this to mean Geir didn't understand what the
heck Tim meant.

http://www.ftponline.com/javapro/2002_06/magazine/features/shalloway/

JavaPro article - Table 1 (link broken in the article) shows:
Level.ALL  == Integer.MAX_VALUE
Level.SEVERE == 1000
Level.WARNING == 900
Level.INFO == 800
Level.CONFIG == 700
Level.FINE == 500
Level.FINER == 400
Level.FINEST == 300
Level.ALL == Integer.MIN_VALUE

So the Levels are really just convenient integers... so I guess I could
write:

myLogger.log(200, "This is Supa-Fine, Baby!");

Interesting. Not necessarily useful. But interesting. ;-)

> I don't want to rekindle this 
> right now - I still have to do my homework.
Hah, apologies for bringing this up again... I would have jumped on when
the thread started, but I was probably in Barcelona at the time. :-)

Cheers,
Timo


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


Re: logging?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Oh, I so dread revisiting this tonight - I'd been planning to relax 
this weekend after coming back from mirror-world....

On Sunday, November 9, 2003, at 05:25 PM, Tim Colson wrote:

>> Why?  Doesn't logj4 have a 1.4 logger?
> Hmm... interesting idea, log4j wrapping JDK 1.4 logging.

Why not?  Log4j 'appenders' could log to anything.  DBs.  Syslog. 
legacy log systems.  Gerbils.  Why not jdk1.4?  I keep goading Ceki 
about this, but he hasn't bitten yet :)

>
>> I accidentally used the jdk1.4 logging a few days ago. The person who
>> thought of 'fine', 'finer' and 'finest' should be flogged.
> +1
> (Although after reading a bit closer to see that these are just
> constants in a range from Integer.MIN to Integer.Max, I can almost kind
> of sorta like the flexibility that could afford.)

?

>
>>> Geir made a point that C-L can't track logger specific changes as
>>> quickly as self-maintained LogSystem... but I think that
>> sounds a bit like laziness. <grin>
>>
>> Not at all.  Why is that lazy?
>
> I apologize if my quick skim missed some points, but the general thread
> sounded a bit like, "We should be able to change logging quickly to
> support nifty kewl logging stuff... Velocity LogSystem lets us do that
> because...well, because Velocity commiters could commit code without 
> any
> hassle...whereas if the log component was replaced with C-L... we'd 
> have
> to badger the C-L folks....and that'd be more work."

I'll say again that I think that C-L has it's place, and is actually 
really nice for some things.  But not everything.  I think we should 
support it - make sure that c-l users can just hook velocity in.  But 
as to dedicating our lives to it?  :)  I don't want to rekindle this 
right now - I still have to do my homework.

>
>> You can't fix the usage pattern, though.  I've tried...
> I don't claim a deep understanding...but on the surface I'm seeing
> LogSystem and C-L as similar beasts, similar usage. So long as I can
> write logThingy.error("Boom!") - I'm pretty happy. Albeit, I'd want
> Nested Diagnostic Contexts from log4j too... they are quite nice for
> pushing the session ID into every log mesg from a servlet.)
>
> But whatever floats most folks boats works for me.
>
> Cheers,
> Timo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


RE: logging?

Posted by Tim Colson <tc...@cisco.com>.
> Why?  Doesn't logj4 have a 1.4 logger?
Hmm... interesting idea, log4j wrapping JDK 1.4 logging.

> I accidentally used the jdk1.4 logging a few days ago. The person who 
> thought of 'fine', 'finer' and 'finest' should be flogged.
+1
(Although after reading a bit closer to see that these are just
constants in a range from Integer.MIN to Integer.Max, I can almost kind
of sorta like the flexibility that could afford.)

> > Geir made a point that C-L can't track logger specific changes as
> > quickly as self-maintained LogSystem... but I think that 
> sounds a bit like laziness. <grin>
> 
> Not at all.  Why is that lazy?

I apologize if my quick skim missed some points, but the general thread
sounded a bit like, "We should be able to change logging quickly to
support nifty kewl logging stuff... Velocity LogSystem lets us do that
because...well, because Velocity commiters could commit code without any
hassle...whereas if the log component was replaced with C-L... we'd have
to badger the C-L folks....and that'd be more work."

> You can't fix the usage pattern, though.  I've tried...
I don't claim a deep understanding...but on the surface I'm seeing
LogSystem and C-L as similar beasts, similar usage. So long as I can
write logThingy.error("Boom!") - I'm pretty happy. Albeit, I'd want
Nested Diagnostic Contexts from log4j too... they are quite nice for
pushing the session ID into every log mesg from a servlet.)

But whatever floats most folks boats works for me. 

Cheers,
Timo


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


Re: logging?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Sunday, November 9, 2003, at 03:21 PM, Tim Colson wrote:

> Somebody wrote:
>>> If the option of "just use Log4J directly in Velocity" was
>>> on the table,  I wouldn't complain.
>>> But I suspect a lot of other people would....
>
> I wouldn't complain either. :-)
>
> But then, I can also see that if folks decide to use JDK 1.4 logging,
> they wouldn't be happy if Velocity mandated log4j.

Why?  Doesn't logj4 have a 1.4 logger?

That's the cool thing I think that log4j should do.  Add a jdk1.4 
logger, a lightweight layer for discovery, and that would be that.  No 
need for c-l.

Of course, it had better include a trace() :)

I accidentally used the jdk1.4 logging a few days ago. The person who 
thought of 'fine', 'finer' and 'finest' should be flogged.

>
> So I guess I see the 'need' for a wrapper like C-L... and I agree with
> Nathan that C-L and LogSystem seem to be in the same 'problem space' -
> and of those, I'd vote for C-L.
>
> Geir made a point that C-L can't track logger specific changes as
> quickly as self-maintained LogSystem... but I think that sounds a bit
> like laziness. <grin>

Not at all.  Why is that lazy?

>
>  I mean, C-L is open source too - so missing feature patches can be 
> sent
> to the C-L team.

You can't fix the usage pattern, though.  I've tried...

geir

>
> Timo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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