logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Longman <cra...@begeek.com>
Subject questions/suggestions
Date Thu, 10 May 2001 05:49:28 GMT

hi there,

i recently decided to upgrade my own custom logging program with a
couple features.  before i did that though, i did a quick search around
for other logging packages and happened across the log4j package.  i
downloaded it and i am very impressed.  i'm sure the dev team is
inundated with accolades, but i insist on adding mine to the pile.  a
fine piece of software.  i decided to stop using my package, and use
log4j instead.

i have a couple of suggestions i would like to offer based on
modifications i've made and found useful.  although i suspect it may be
a little late for 1.1 release.

the first one is simply making the separator used in the ctor for
NDC.DiagnosticContext not default to a space, but make it a field in
NDC.  some of the information i use looks better when it has periods
separating the bits, sometimes spaces/commas/colons etc.  a minor point.

the other is extending the relative time concept to include relative
time in a particular NDC.  i use the NDC to provide logging information
for a client connetion to a servlet env we use, and i find it helpful to
both know how long the entire user connection lasted, as well as how
long an individual piece of the code took to run.  this NDC time can be
optionally individually set for each push operation, only use the
initial push time, as well as providing a resetStartTime() to reset the
relative time for a particular NDC level.  this is used in the
PatternLayout with an upper-case R as the conversion character.  i have
also set it up such that if the time isn't explicitly set at the NDC
level, then the LoggingEvent.getStartTime() value is used, effetively
allowing me to always just use %R, and if i was concerned about timing
at the NDC level, i get that time.  if i wasn't concerned and didn't
modify the NDC start time, then it acts just like the %r conversion

if these would be of any use to anyone else, please let me know what i
should do about submitting these changes.  they're pretty small,
probably only about 20 lines, not including comments.



    Be Developer ID: 5852

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

View raw message