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

Jan Høydahl commented on SOLR-14699:
------------------------------------

How does this relate to SOLR-15610 and switching log layout in log4j2.xml as 
documented here 
[https://solr.apache.org/guide/solr/latest/deployment-guide/configuring-logging.html#permanent-logging-settings?]

I remember I did a test to configure Log4j to output JSON formatted logs (see 
[https://the-asf.slack.com/archives/CEKUCUNE9/p1644570902234089] for slack 
thread), but due to this custom string concatenation we use in 
{{{}getToLogAsString(){}}}, the resulting "message" key was not very useful.

I'd love for this work to be configurable using log4j Layout, and that by using 
the legacy Layout you'd get the old string based logs format, then users can 
choose.

> Solr request logs should escape names, values 
> (SolrQueryResponse.getToLogAsString)
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-14699
>                 URL: https://issues.apache.org/jira/browse/SOLR-14699
>             Project: Solr
>          Issue Type: Improvement
>          Components: logging
>            Reporter: David Smiley
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{SolrQueryResponse.getToLogAsString}} encodes the NamedList into a String 
> with simple space-separated pairs with name=value.  However, it does no 
> escaping/encoding, and as-such a value might itself contain spaces and 
> equals.  This is a problem if these logs are being parsed, and we'd like to 
> ensure we do so correctly.  Note that SolrLogPostTool (aka "postlogs") parses 
> these logs.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to