You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2013/06/13 10:35:03 UTC

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Hi,

On Thu, Jun 13, 2013 at 11:23 AM,  <md...@apache.org> wrote:
> +    private final String initStacktrace;

A better approach might be to keep an Exception instance for this
purpose. Logging tools are typically better prepared to handle and
format a stack trace from an exception instance instead of a long
multi-line string as the log message.

BR,

Jukka Zitting

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Posted by Michael Dürig <md...@apache.org>.

On 13.6.13 11:27, Michael Dürig wrote:
>
>
> Ok agreed. We make it the responsibility of the deployment to have a
> "sensible" logging configuration then. I'll change this later on.

See http://svn.apache.org/r1492631

Michael

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Posted by Michael Dürig <md...@apache.org>.

On 13.6.13 11:19, Jukka Zitting wrote:
> Hi,
>
> On Thu, Jun 13, 2013 at 1:13 PM, Michael Dürig <md...@apache.org> wrote:
>> Right. I guess we need to weight not having the stack trace at all since the
>> default logging configuration doesn't includes it against being able to
>> include additional information through configuration.
>
> Which default configuration are you referring to? Can we change it?
>
> A logging configuration that doesn't include the exception attached
> with a warning log message seems potentially troublesome in any case.

Ok agreed. We make it the responsibility of the deployment to have a 
"sensible" logging configuration then. I'll change this later on.

Michael

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Jun 13, 2013 at 1:13 PM, Michael Dürig <md...@apache.org> wrote:
> Right. I guess we need to weight not having the stack trace at all since the
> default logging configuration doesn't includes it against being able to
> include additional information through configuration.

Which default configuration are you referring to? Can we change it?

A logging configuration that doesn't include the exception attached
with a warning log message seems potentially troublesome in any case.

BR,

Jukka Zitting

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Posted by Michael Dürig <md...@apache.org>.

On 13.6.13 11:07, Jukka Zitting wrote:
> Hi,
>
> On Thu, Jun 13, 2013 at 11:42 AM, Michael Dürig <md...@apache.org> wrote:
>> I considered that but wanted to have the stack trace in the log message
>> regardless of the logger message format configuration.
>
> OK. Note thought that this approach takes away the ability of logging
> frameworks to provide additional context information that the default
> JVM stack trace formatting doesn't provide. For example, see
> http://logback.qos.ch/reasonsToSwitch.html#packagingData.

Right. I guess we need to weight not having the stack trace at all since 
the default logging configuration doesn't includes it against being able 
to include additional information through configuration.

Michael

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Jun 13, 2013 at 11:42 AM, Michael Dürig <md...@apache.org> wrote:
> I considered that but wanted to have the stack trace in the log message
> regardless of the logger message format configuration.

OK. Note thought that this approach takes away the ability of logging
frameworks to provide additional context information that the default
JVM stack trace formatting doesn't provide. For example, see
http://logback.qos.ch/reasonsToSwitch.html#packagingData.

BR,

Jukka Zitting

Re: svn commit: r1492561 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java

Posted by Michael Dürig <md...@apache.org>.
On 13.6.13 9:35, Jukka Zitting wrote:
> A better approach might be to keep an Exception instance for this
> purpose. Logging tools are typically better prepared to handle and
> format a stack trace from an exception instance instead of a long
> multi-line string as the log message.

I considered that but wanted to have the stack trace in the log message 
regardless of the logger message format configuration.

Michael