Use consistent logger names (#1945)

This commit is contained in:
Joe Ranweiler
2022-05-15 15:22:53 -07:00
committed by GitHub
parent 806409bdbf
commit 3dd27be55b
3 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ DEFAULT_TOKEN_PATH = os.path.join(ONEFUZZ_BASE_PATH, "access_token.json")
REQUEST_CONNECT_TIMEOUT = 30.0 REQUEST_CONNECT_TIMEOUT = 30.0
REQUEST_READ_TIMEOUT = 120.0 REQUEST_READ_TIMEOUT = 120.0
LOGGER = logging.getLogger("nsv-backend") LOGGER = logging.getLogger("backend")
@contextlib.contextmanager @contextlib.contextmanager

View File

@ -558,11 +558,11 @@ def execute_api(api: Any, api_types: List[Any], version: str) -> int:
elif args.verbose == 1: elif args.verbose == 1:
logging.basicConfig(level=logging.WARNING) logging.basicConfig(level=logging.WARNING)
api.logger.setLevel(logging.INFO) api.logger.setLevel(logging.INFO)
logging.getLogger("nsv-backend").setLevel(logging.DEBUG) logging.getLogger("backend").setLevel(logging.DEBUG)
elif args.verbose == 2: elif args.verbose == 2:
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
api.logger.setLevel(logging.DEBUG) api.logger.setLevel(logging.DEBUG)
logging.getLogger("nsv-backend").setLevel(logging.DEBUG) logging.getLogger("backend").setLevel(logging.DEBUG)
elif args.verbose >= 3: elif args.verbose >= 3:
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
api.logger.setLevel(logging.DEBUG) api.logger.setLevel(logging.DEBUG)

View File

@ -78,7 +78,7 @@ def build_ssh_command(
if port: if port:
cmd += ["-p", str(port)] cmd += ["-p", str(port)]
log_level = logging.getLogger("nsv-backend").getEffectiveLevel() log_level = logging.getLogger("backend").getEffectiveLevel()
if log_level <= logging.DEBUG: if log_level <= logging.DEBUG:
cmd += ["-v"] cmd += ["-v"]