I'm using logging standard library and add the handler to output to stdout. However, the new handler doesn't seem to have the default logging format, below is the example
In [23]: root = logging.getLogger()
...: handler = logging.StreamHandler(sys.stdout)
...: log_level_int = getattr(logging, "INFO")
...: root.setLevel(log_level_int)
...: handler.setLevel(log_level_int)
...: root.addHandler(handler)
In [28]: logging.info("test")
INFO:root:test # default stderr handler
test # newly added stdout handler, doesn't have the log level information printed
How can the new stdout handler use the same format as the default?