[jira] [Commented] (OAK-7226) Warn messages ignoring exception parameter

2018-01-31 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16346825#comment-16346825
 ] 

Chetan Mehrotra commented on OAK-7226:
--

Logback also supports it [1]

[1] 
https://github.com/qos-ch/logback/blob/master/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggingEvent.java#L114

> Warn messages ignoring exception parameter
> --
>
> Key: OAK-7226
> URL: https://issues.apache.org/jira/browse/OAK-7226
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: blob-plugins
>Affects Versions: 1.8.0
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: 1.10
>
>
> There are a few usages of Logger.warn() with a pattern similar to this 
> example:
> {noformat}
> log.warn("Error occurred while fetching DataRecord for identifier {}", input, 
> exeption);
> {noformat}
> The intention probably is that the third parameter is treated as an exception 
> and e.g. logged with the stack trace. However, this method signature 
> interprets the exception as a second argument for the message format. This 
> means the exception is effectively ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-7226) Warn messages ignoring exception parameter

2018-01-31 Thread Marcel Reutegger (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16346806#comment-16346806
 ] 

Marcel Reutegger commented on OAK-7226:
---

Hmm, now I'm confused. How can slf4j do that? Isn't this up to the actual 
logging framework how to implement the interface defined by slf4j? E.g. we use 
logback in Oak, which doesn't seem to have this 'feature'.

> Warn messages ignoring exception parameter
> --
>
> Key: OAK-7226
> URL: https://issues.apache.org/jira/browse/OAK-7226
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: blob-plugins
>Affects Versions: 1.8.0
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: 1.10
>
>
> There are a few usages of Logger.warn() with a pattern similar to this 
> example:
> {noformat}
> log.warn("Error occurred while fetching DataRecord for identifier {}", input, 
> exeption);
> {noformat}
> The intention probably is that the third parameter is treated as an exception 
> and e.g. logged with the stack trace. However, this method signature 
> interprets the exception as a second argument for the message format. This 
> means the exception is effectively ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OAK-7226) Warn messages ignoring exception parameter

2018-01-31 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/OAK-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16346776#comment-16346776
 ] 

Chetan Mehrotra commented on OAK-7226:
--

[~mreutegg] This is a "feature" of slf4j 
https://www.slf4j.org/faq.html#paramException

> Warn messages ignoring exception parameter
> --
>
> Key: OAK-7226
> URL: https://issues.apache.org/jira/browse/OAK-7226
> Project: Jackrabbit Oak
>  Issue Type: Bug
>  Components: blob-plugins
>Affects Versions: 1.8.0
>Reporter: Marcel Reutegger
>Priority: Minor
> Fix For: 1.10
>
>
> There are a few usages of Logger.warn() with a pattern similar to this 
> example:
> {noformat}
> log.warn("Error occurred while fetching DataRecord for identifier {}", input, 
> exeption);
> {noformat}
> The intention probably is that the third parameter is treated as an exception 
> and e.g. logged with the stack trace. However, this method signature 
> interprets the exception as a second argument for the message format. This 
> means the exception is effectively ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)