Comment 2 for bug 1076821

Revision history for this message
yong sheng gong (gongysh) wrote :

Can handler have two formaters at the same time?
for handler in log_root.handlers:
        datefmt = CONF.log_date_format
        if CONF.log_format:
            handler.setFormatter(logging.Formatter(fmt=CONF.log_format,
                                                   datefmt=datefmt))
        handler.setFormatter(LegacyFormatter(datefmt=datefmt))