[ 
https://issues.apache.org/jira/browse/SOLR-18133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18062427#comment-18062427
 ] 

ASF subversion and git services commented on SOLR-18133:
--------------------------------------------------------

Commit e86831a2c27a8e450429978bbb20ab7813171f55 in solr's branch 
refs/heads/branch_10x from Jason Gerlowski
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=e86831a2c27 ]

SOLR-18133: Remove error-truncation in log4j2.xml (#4163)



> Solr should log full stacktraces rather than abbreviated ones
> -------------------------------------------------------------
>
>                 Key: SOLR-18133
>                 URL: https://issues.apache.org/jira/browse/SOLR-18133
>             Project: Solr
>          Issue Type: Bug
>          Components: logging
>    Affects Versions: main(11.0)
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Many log4j2.xml config files rely on the following pattern for 
> "PatternLayout":
> {code}
> %maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) 
> [%notEmpty{c:%X{collection}}%notEmpty{ s:%X{shard}}%notEmpty{ 
> r:%X{replica}}%notEmpty{ x:%X{core}}%notEmpty{ t:%X{trace_id}}] %c{1.} 
> %m%notEmpty{ =>%ex{short}}}{10240}%n
> {code}
> Of particular note is the "ex\{short\}" bit at the end of the pattern string 
> - this tells log4j2 to only print a "shortened" stacktrace of one or two 
> lines instead of the full thing.
> While brevity is always appreciated, this cuts out too much useful 
> information and makes it more difficult to debug server behavior.
> *NOTE:*
> There's some uncertainty around when this behavior started.  On one hand, I 
> don't recollect seeing this in currently released versions of Solr (e.g. 
> 9.10.1).  But on the other hand...patternLayout string has had "ex{short}" 
> since Erick Erickson's work on async logging back in 2019 (0de390 of 
> SOLR-12055).
> I suspect (but haven't proved) that there was a bug in past log4j versions 
> that prevented us from getting the shortened exception behavior despite our 
> config requesting it.  And that we only started seeing the shortened behavior 
> following a log4j upgrade somewhat recently.
> In any case, I see the shorted stacktrace on 'main' as of 2/25.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to