class UnixTimeStampFormatter(logging.Formatter):

    def formatTime(self, record, datefmt=None):
        return '{0:.6f}'.format(record.created)

def main():
    logChannel = logging.StreamHandler()
logChannel.setFormatter(UnixTimeStampFormatter(
    '%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s'))
logging.getLogger().setLevel(logging.DEBUG)
logging.getLogger().addHandler(logChannel)
logging.debug('hello')
if __name__ == '__main__':
    main()
Is there a way to configure a Python logging formatter via config file to log time as Unix timestamp?