source: loggingpy/tudelft/utilities/logging/Reporter.py@ 204

Last change on this file since 204 was 204, checked in by wouter, 3 years ago

#87

File size: 599 bytes
Line 
1from abc import ABC, abstractmethod
2import logging
3
4class Reporter(ABC):
5 '''
6 logs events. We don't use {@link Logger} because that's not an interface and
7 is hard to stub properly because the class is protected and builds on static
8 code.
9 '''
10
11 @abstractmethod
12 def log(self, level:int, msg:str, thrown:BaseException=None):
13 '''
14 Log a message, with associated Throwable information.
15
16 @param level One of the message level identifiers. Eg
17 logging.WARNING
18 @param msg The string message (or a key in the message catalog)
19 @param thrown Exception associated with log message.
20 '''
21
Note: See TracBrowser for help on using the repository browser.