I tried setting following in my logback.xml . I can see access.log file being generated in logs directory but no logs is written when I am making http requests to play server. Application logs are being written in regular application.log file but nothing in access.log
Example in docs says logger name should be "access". wonder if that's incorrect. https://www.playframework.com/documentation/2.6.x/SettingsLogger
<appender name="ACCESS_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${application.home:-.}/logs/access.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover with compression -->
<fileNamePattern>access-log-%d{yyyy-MM-dd}.gz</fileNamePattern>
<!-- keep 1 week worth of history -->
<maxHistory>7</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date{yyyy-MM-dd HH:mm:ss ZZZZ} %message%n</pattern>
<!-- this quadruples logging throughput -->
<immediateFlush>false</immediateFlush>
</encoder>
</appender>
<!-- additivity=false ensures access log data only goes to the access log -->
<logger name="access" level="INFO" additivity="false">
<appender-ref ref="ACCESS_FILE" />
</logger>
I don't think there is an "access" logger by default. You would have to create that yourself, e.g. by defining a filter which logs each request to the Logger you created.