logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Ståldal <mikael.stal...@magine.com>
Subject Re: RingBufferLogEvent#StringBuilderWrapperMessage is incomplete
Date Tue, 22 Mar 2016 16:04:38 GMT
I think it will be difficult to adapt all layouts (and appenders without
layouts) to use StringBuilderFormattable.formatTo(StringBuilder)
instead of String
Message.getFormattedMessage().

I suggest we add another method to StringBuilderFormattable:

CharSequence getFormattedMessageBuffer(); // feel free to suggest a better
name

That method could just return the StringBuilder, and be equally allocation
free. The each layout / appender can use whichever method is easiest in
that case.

I am looking at GelfLayout, and it would be easier to use a method
returning a CharSequence instead of formatTo(StringBuilder).

On Tue, Mar 22, 2016 at 4:50 PM, Mikael Ståldal <mikael.staldal@magine.com>
wrote:

> Should we to the trimming in getFormattedMessage() as well as in
> toFormat()?
>
> On Tue, Mar 22, 2016 at 4:38 PM, Remko Popma <remko.popma@gmail.com>
> wrote:
>
>> Thanks! Done.
>>
>> Sent from my iPhone
>>
>> On 2016/03/23, at 0:10, Mikael Ståldal <mikael.staldal@magine.com> wrote:
>>
>> I think that RingBufferLogEvent#StringBuilderWrapperMessage need to have
>> a proper implementation of getFormattedMessage(), otherwise layouts and
>> appenders which does not use formatTo() will not work.
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Mime
View raw message