logback-access-spring-boot-starter icon indicating copy to clipboard operation
logback-access-spring-boot-starter copied to clipboard

JSON Access log Logging

Open rajivraghu opened this issue 1 year ago • 2 comments

Hello, I am using implementation group: 'dev.akkinoc.spring.boot', name: 'logback-access-spring-boot-starter', version: '3.0.0'

The below works..

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>common</pattern>
        </encoder>
    </appender>
    <appender-ref ref="console"/>
</configuration>

But the JSON logging is not printing anything in the console..

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
		<encoder class="net.logstash.logback.encoder.LogstashAccessEncoder" />
	</appender>
	<appender-ref ref="CONSOLE" />
</configuration>

Any tips ?

rajivraghu avatar Aug 05 '23 08:08 rajivraghu

Running into the same issue here.

sruffatti avatar Dec 19 '23 14:12 sruffatti

I was able to get JSON logging to work following this closed issue - https://github.com/akkinoc/logback-access-spring-boot-starter/issues/37

sruffatti avatar Dec 19 '23 14:12 sruffatti