@Override
    protected void subAppend(LoggingEvent event) {
        long n = System.currentTimeMillis();
        if (n >= nextCheck) {
            now.setTime(n);
            nextCheck = rc.getNextCheckMillis(now);
            try {
                rollOver();
            }
            catch (IOException ioe) {
                LogLog.error("rollOver() failed.", ioe);
            }
        }
        super.subAppend(event);
    }
This method differentiates DailyRollingFileAppender from its super class.

<p>
Before actually logging, this method will check whether it is time to do
a rollover. If it is, it will schedule the next rollover time and then
rollover.
metamorphosis-client-extension/src/main/java/com/taobao/metamorphosis/client/extension/log4j/DailyRollingFileStreamAppender.java