It totally makes sense to trim it. With the upcoming GC-free changes I was
planning to reduce the RingBuffer's StringBuilder to 518 chars (two resizes
from the default). There are a lot of those instances so it makes sense to
be strict about their size. With the Layout there are only as many
StringBuilders are there are threads, so we could keep their size a bit
larger. Maybe ~2K but make it configurable?

On Sat, Mar 12, 2016 at 8:49 AM, Gary Gregory <[email protected]>
wrote:

> So the default trim would be 10K, seems reasonable.
>
> Gary
>
> On Fri, Mar 11, 2016 at 1:02 PM, Ralph Goers <[email protected]>
> wrote:
>
>> I would trim it to a default max value - something like 10K. Even that
>> seems like a lot.  This should be configurable through our properties file.
>>
>> Ralph
>>
>> On Mar 11, 2016, at 1:56 PM, Gary Gregory <[email protected]> wrote:
>>
>> So do we need a layout setting to shrink the buffer back down after a
>> while to a user defined level?
>>
>> This is after answering the obvious question of why would you log a 10 MB
>> message?
>>
>> Gary
>>
>> On Fri, Mar 11, 2016 at 12:38 PM, luca boncompagni <[email protected]>
>> wrote:
>>
>>>
>>> Il 11/mar/2016 21:14, "Matt Sicker" <[email protected]> ha scritto:
>>> >
>>> > Does your app make a lot of large log messages or is it just used in a
>>> couple loggers? Because I think you could use a custom MessageFactory for
>>> those loggers to reduce memory usage at the cost of performance.
>>> >
>>>
>>> My app is a webapp running on wildfly. Long message are not so frequent,
>>> but if I have every thread of wildfly with a StringBuilder of ~ 10Mb I have
>>> some serious memory problem.
>>>
>>> Luca
>>>
>>
>>
>>
>> --
>> E-Mail: [email protected] | [email protected]
>> Java Persistence with Hibernate, Second Edition
>> <http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>

Reply via email to