mirror of https://github.com/docker/compose.git
Set up default logging
This commit is contained in:
parent
3b654ad349
commit
8005254138
|
@ -16,7 +16,18 @@ from .docopt_command import NoSuchCommand
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
console_handler = logging.StreamHandler()
|
||||||
|
console_handler.setFormatter(logging.Formatter())
|
||||||
|
console_handler.setLevel(logging.INFO)
|
||||||
|
root_logger = logging.getLogger()
|
||||||
|
root_logger.addHandler(console_handler)
|
||||||
|
root_logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
|
# Disable requests logging
|
||||||
|
logging.getLogger("requests").propagate = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
command = TopLevelCommand()
|
command = TopLevelCommand()
|
||||||
command.sys_dispatch()
|
command.sys_dispatch()
|
||||||
|
|
Loading…
Reference in New Issue