import asyncio
import logging

logger = logging.getLogger(__name__)

class TaskRunner:
    def __init__(self, sandbox_pool, languages, checkers):
        self.sandbox_pool = sandbox_pool
        self.languages = languages
        self.checkers = checkers

    async def run(self, task):
        async with self.sandbox_pool.acquire() as box:
            logger.debug("Running %s", task)
            lang = self.languages[task.submission.language_name]
            check = self.checkers[task.testcase.checker_name]
            await lang.run_task(box, task)
            if task.verdict is not None:
                task.accepted = False
            else:
                await check.check(box, task)

import asyncio
import logging

logger = logging.getLogger(__name__)

class TaskRunner:
    def __init__(self, sandbox_pool, languages, checkers):
        self.sandbox_pool = sandbox_pool
        self.languages = languages
        self.checkers = checkers

    async def run(self, task):
        async with self.sandbox_pool.acquire() as box:
            language_name = task.submission.language_name
            checker_name = task.testcase.checker_name
            logger.info("Running %s, language %s, checker %s",
                    task, language_name, checker_name)
            lang = self.languages[language_name]
            check = self.checkers[checker_name]
            await lang.run_task(box, task)
            if task.verdict is not None:
                task.accepted = False
            else:
                await check.check(box, task)

Print running task, language and checker as INFO
judge: Print running task, language and checker as INFO

  import asyncio
  import logging
  
  logger = logging.getLogger(__name__)
  
  class TaskRunner:
      def __init__(self, sandbox_pool, languages, checkers):
          self.sandbox_pool = sandbox_pool
          self.languages = languages
          self.checkers = checkers
  
      async def run(self, task):
          async with self.sandbox_pool.acquire() as box:
-             logger.debug("Running %s", task)
+             language_name = task.submission.language_name
+             checker_name = task.testcase.checker_name
+             logger.info("Running %s, language %s, checker %s",
+                     task, language_name, checker_name)
-             lang = self.languages[task.submission.language_name]
+             lang = self.languages[language_name]
-             check = self.checkers[task.testcase.checker_name]
+             check = self.checkers[checker_name]
              await lang.run_task(box, task)
              if task.verdict is not None:
                  task.accepted = False
              else:
                  await check.check(box, task)
  
Print running task, language and checker as INFO
## Code Before:
import asyncio
import logging

logger = logging.getLogger(__name__)

class TaskRunner:
    def __init__(self, sandbox_pool, languages, checkers):
        self.sandbox_pool = sandbox_pool
        self.languages = languages
        self.checkers = checkers

    async def run(self, task):
        async with self.sandbox_pool.acquire() as box:
            logger.debug("Running %s", task)
            lang = self.languages[task.submission.language_name]
            check = self.checkers[task.testcase.checker_name]
            await lang.run_task(box, task)
            if task.verdict is not None:
                task.accepted = False
            else:
                await check.check(box, task)

## Instruction:
Print running task, language and checker as INFO
## Code After:
import asyncio
import logging

logger = logging.getLogger(__name__)

class TaskRunner:
    def __init__(self, sandbox_pool, languages, checkers):
        self.sandbox_pool = sandbox_pool
        self.languages = languages
        self.checkers = checkers

    async def run(self, task):
        async with self.sandbox_pool.acquire() as box:
            language_name = task.submission.language_name
            checker_name = task.testcase.checker_name
            logger.info("Running %s, language %s, checker %s",
                    task, language_name, checker_name)
            lang = self.languages[language_name]
            check = self.checkers[checker_name]
            await lang.run_task(box, task)
            if task.verdict is not None:
                task.accepted = False
            else:
                await check.check(box, task)
