vmtest: fix logging to the root logger

There are a few places calling logging.info() instead of logger.info().
Fix them.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
This commit is contained in:
Omar Sandoval 2023-08-22 13:52:46 -07:00
parent a66d033f1c
commit 3afa6b2665
3 changed files with 7 additions and 7 deletions

View File

@ -112,7 +112,7 @@ async def apply_patches(kernel_dir: Path) -> None:
.decode()
.strip()
)
logging.info("applying patches for kernel version %s", version)
logger.info("applying patches for kernel version %s", version)
any_applied = False
for patch in _PATCHES:
for min_version, max_version in patch.versions:
@ -122,7 +122,7 @@ async def apply_patches(kernel_dir: Path) -> None:
break
else:
continue
logging.info("applying %s", patch.name)
logger.info("applying %s", patch.name)
any_applied = True
proc = await asyncio.create_subprocess_exec(
"git",
@ -147,9 +147,9 @@ async def apply_patches(kernel_dir: Path) -> None:
sys.stderr.buffer.write(stderr)
sys.stderr.buffer.flush()
raise
logging.info("already applied")
logger.info("already applied")
if not any_applied:
logging.info("no patches")
logger.info("no patches")
class KBuild:

View File

@ -23,7 +23,7 @@ def build_kmod(download_dir: Path, kernel: Kernel) -> Path:
kmod_source_dir = Path("tests/linux_kernel/kmod")
source_files = ("drgn_test.c", "Makefile")
if out_of_date(kmod, *[kmod_source_dir / filename for filename in source_files]):
logging.info("building %s", kmod)
logger.info("building %s", kmod)
compiler = downloaded_compiler(download_dir, kernel.arch)
kernel_build_dir = kernel.path / "build"
@ -55,7 +55,7 @@ def build_kmod(download_dir: Path, kernel: Kernel) -> Path:
)
(tmp_dir / "drgn_test.ko").rename(kmod)
else:
logging.info("%s is up to date", kmod)
logger.info("%s is up to date", kmod)
return kmod

View File

@ -360,7 +360,7 @@ async def main() -> None:
if to_build:
logger.info("kernel versions to build:")
for tag, tag_arches_to_build in to_build:
logging.info(
logger.info(
" %s (%s)",
tag,
", ".join(