I am looking for rollover strategy where current log (*active output target* in [manual](http://logging.apache.org/log4j/2.x/manual/appenders.html#DefaultRolloverStrategy)'s terminology) file name is not fixed but specified by a pattern, or - more precisely - same pattern as in `filePattern` attribute.

I want to achieve daily rollover where today's log is, say, `log-2015-05-05.log` and on midnight framework just stops writing it and starts writing into `log-2015-05-06.log`. However, AFAIK, current configuration allows only

```
<RollingFile name="ROLFILE"
    fileName="log.log"
    filePattern="log-%d{yyyy-MM-dd}.log"
>

```

Specifying same value into `fileName` attribute doesn't work (leads to file with sensitive characters literally interpreted). I noticed no example or SO question with such a dynamic value of `fileName`. Note the `fileName="log-${date:yyyy-MM-dd}.log"` doesn't solve problem since expression is evaluated only at startup and events are still sent into file even if their timestamp doesn't match the expression.

I am migrating from Log4j 1.2 to Log4j 2.2. In old version, required behavior was possible using

```
<appender name="ROLFILE" class="org.apache.log4j.rolling.RollingFileAppender">
    <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
        <param name="FileNamePattern" value="log-%d{yyyy-MM-dd}.log" />
    </rollingPolicy>
    ...

```

I prefer to preserve current way since some log analyzing tools rely on it.
Is it possible in Log4j2?
Thanks.