logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Kristensen <akristen...@dynamicsoft.com>
Subject Re: Digitally signing log entries
Date Thu, 07 Jun 2001 22:04:28 GMT
So at the moment we have a bunch of "official" conversion characters in
PatternLayout. Anything not in PatternLayout is really app specific and
individual custom appenders can assign whatever meaning they like to
those characters.

IMHO, if we extend PatternLayout to support a bigger space of variables
it should be to support vairable names of any length. There is really no
reason why they have to be restricted to one or two characters. A syntax
like %{foo} would work. With format modifiers and arguments this would
be something like %-20{date}{ISO8601}. This wouldn't mean anything in
the old syntax so this is backward compatible.

Anders


Paul Glezen wrote:
> 
> yogi wrote:
> >
> > For this I'm writing a PatternConverter for a character...say 's'. This
> > converter uses javax.crypto.Mac
> 
> Hi Yogi,
> 
> You might want to check out the example in
> 
>   org.apache.log4j.examples.appserver
> 
> for an example of adding attributes to a LoggingEvent and what other
> supporting classes should be added.  There is also deepExtensions.html
> in the docs directory that gives more explanation.
> 
> You may notice that 's' is already used there (for Server name).  This
> brings up a concern I see on the horizon: not enough letters for
> meaningful conversion characters.  A possible solution is to have each
> extension have only one conversion character with sub-character in
> brackets.  For example, instead of AppServerPatternConverter using up
> four characters, ('s', 'h', 'b', 'v'), it could use just 'a' (for
> appserver) and include the other ones in brackets: "a{s}", "a{h}",
> "a{c}" and "a{v}".  (Notice I used "a{c} instead of "a{b}".  That's
> because c, which stands for "Component", was already taken by "category"
> and "Class".)
> 
> Just a thought.  I know I'm going to be tripping all over myself with
> new conversion characters that I have on deck unless I do something like
> this.
> 
> - Paul
> --
> Beware of bugs in the above code.  I have
> only proved it correct, not tried it.
> -Don Knuth
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org

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


Mime
View raw message