<configuration>
    <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOGGING_PATH:-/tmp}/access.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOGGING_PATH:-/tmp}/access.%d{yyyy-MM-dd_HH}.log.zip</fileNamePattern>
            <maxHistory>${REQUESTLOG_RETAINHOURS:-72}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>%i{X-Forwarded-For} %h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" %D</pattern>
        </encoder>
    </appender>
    <appender-ref ref="file" />
</configuration>

<configuration>
    <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOGGING_PATH:-/tmp}/access.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOGGING_PATH:-/tmp}/access.%d{yyyy-MM-dd_HH}.log.zip</fileNamePattern>
            <maxHistory>${REQUESTLOG_RETAINHOURS:-72}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>"%i{X-Forwarded-For}" %h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" %D</pattern>
        </encoder>
    </appender>
    <appender-ref ref="file" />
</configuration>

Add quotes to X-Forwarded-For to support spaces in the value
Add quotes to X-Forwarded-For to support spaces in the value

E.g.

X-Forwarded-For: 114.121.233.9, 23.0.162.52
