logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Deboy <scott.de...@gmail.com>
Subject Re: Change level name String ?
Date Tue, 30 Oct 2012 21:26:31 GMT
FYI....I did a similar (reverse) thing so the default Android logging could
be slurped in to Chainsaw (with Android's single-letter severities)...so in
theory, you can still use Chainsaw to read log files with weird severity
names..

>From LogFilePatternReceiver sources:

   /**
     * If the log file contains non-log4j level strings, they can be
mapped to log4j levels using the format (android example):
     * V=TRACE,D=DEBUG,I=INFO,W=WARN,E=ERROR,F=FATAL,S=OFF
     *
     * @param customLevelDefinitions the level definition string
     */
  public void setCustomLevelDefinitions(String customLevelDefinitions) {
    this.customLevelDefinitions = customLevelDefinitions;
  }

Scott

On Tue, Oct 30, 2012 at 2:16 PM, Ralph Goers <ralph.goers@dslextreme.com>wrote:

> Ahh. Good question.
>
> I was looking at LevelPatternConverter. It would be relatively trivial to
> allow it to accept options so that you could specify  %p{WARN=Warning,
> ERROR=Error,FATAL=Critical}
>
> Ralph
>
>
> On Oct 30, 2012, at 2:10 PM, Gary Gregory wrote:
>
> Do you want to use log4j 1.2.x or 2.0 (beta)?
>
> Gary
>
> On Tue, Oct 30, 2012 at 5:05 PM, Olivier Lamy <olamy@apache.org> wrote:
>
>> Hm, my goal is to use slf4j as api with log4j2.
>> I would prefer only provide a configuration file and to not have
>> specific log4j code introduced.
>>
>> 2012/10/30 Gary Gregory <garydgregory@gmail.com>:
>> > Hm... in a custom layout I think...
>> >
>> > Gary
>> >
>> >
>> > On Tue, Oct 30, 2012 at 2:38 PM, Gary Gregory <garydgregory@gmail.com>
>> > wrote:
>> >>
>> >> In 1.2, maybe use reflection?
>> >>
>> >> In 2.0, I wonder if we should allow that to be changed and how. In 2.0,
>> >> Level is an enum, not a class...
>> >>
>> >> Gary
>> >>
>> >>
>> >> On Tue, Oct 30, 2012 at 2:19 PM, Olivier Lamy <olamy@apache.org>
>> wrote:
>> >>>
>> >>> Hi,
>> >>> Is there any way to change the string use for level ?
>> >>> I'd like to use WARNING rather than WARN
>> >>>
>> >>> Thanks
>> >>> --
>> >>> Olivier Lamy
>> >>> Talend: http://coders.talend.com
>> >>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> >>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> >> Spring Batch in Action: http://bit.ly/bqpbCK
>> >> Blog: http://garygregory.wordpress.com
>> >> Home: http://garygregory.com/
>> >> Tweet! http://twitter.com/GaryGregory
>> >
>> >
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> > Spring Batch in Action: http://bit.ly/bqpbCK
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977/>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>

Mime
View raw message