Add smart time-based logging