akkinoc / logback-access-spring-boot-starter

Spring Boot Starter for Logback-access.
Apache License 2.0
193 stars 32 forks source link

JSON Access log Logging #353

Open rajivraghu opened 1 year ago

rajivraghu commented 1 year ago

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 ?

sruffatti commented 10 months ago

Running into the same issue here.

sruffatti commented 10 months ago

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