Hi,
This is my current logback-access.xml. The "conversionRule" is working in the logback config for application log, but it is not working in this logback-access.xml. The result is that it will show "h": null.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="host" converterClass="com.ncs.secureconnect.iam.common.v1.logging.HostNameConverter"/>
<appender name="jsonConsoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.AccessEventCompositeJsonEncoder">
<providers>
<timestamp>
<fieldName>timeStamp</fieldName>
<pattern>yyyy-MMM-dd HH:mm:ss.SSS</pattern>
</timestamp>
<pattern>
<pattern>
{
"h": "%host",
"type": "access_log",
"request": "%fullRequest",
"response": "%fullResponse"
}
</pattern>
</pattern>
</providers>
</encoder>
</appender>
<appender name="asyncJsonConsoleAppender" class="net.logstash.logback.appender.AccessEventAsyncDisruptorAppender">
<appender-ref ref="jsonConsoleAppender" />
</appender>
<appender-ref ref="asyncJsonConsoleAppender"/>
</configuration>
Comment From: KaeYan93
Hi, can i know what is the issue? Thanks.
Comment From: wilkinsona
@KaeYan93 We don't know what it is as we haven't had time to look at it. We're an open source project with a small team and this issue was opened only two days ago. One thing that you could do to speed thing up is to provide a complete yet minimal sample that reproduces the problem. A copy-paste of some XML doesn't provide the complete picture. We can't even tell what version of Spring Boot you're using.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.