source: loggingpy/tudelft_utilities_logging/Reporter.py@ 614

Last change on this file since 614 was 207, checked in by wouter, 4 years ago

#87 trying to work around the python library namespaces

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