diff --git a/GradescopeGrader/Grader.py b/GradescopeGrader/Grader.py index 1de4291..75ef72b 100644 --- a/GradescopeGrader/Grader.py +++ b/GradescopeGrader/Grader.py @@ -9,11 +9,13 @@ import json +import logging import os from typing import List, Union from . import Test +from . import _Meta class Grader(object): @@ -23,6 +25,14 @@ def __init__(self) -> None: self.tests: List[Test.Test] = [] + self.logger = logging.getLogger( + __name__ + '.' + self.__class__.__name__ + ) + self.logger.info('{} version {}'.format( + _Meta.PKG_NAME, + _Meta.__version__, + )) + def AddTest(self, test: Test.Test) -> None: self.tests.append(test) diff --git a/runtests.py b/runtests.py index 1ec26bc..3eaf212 100644 --- a/runtests.py +++ b/runtests.py @@ -8,9 +8,15 @@ ### +import logging + from tests.unittest import main if __name__ == '__main__': + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s %(name)s[%(levelname)s]: %(message)s', + ) main()