Design Pattern Examples
Overview of object-oriented design patterns
bridge_nulllogger.py
Go to the documentation of this file.
5
6from .bridge_loggerinterface import ILogger
7
8
10
11 #-------------------------------------------------------------------------
12 # ILogger interface implementation
13 #-------------------------------------------------------------------------
14
15
18 def Close(self) -> None:
19 pass
20
21
25 def LogTrace(self, msg : str) -> None:
26 pass
27
28
32 def LogInfo(self, msg : str) -> None:
33 pass
34
35
39 def LogError(self, msg : str) -> None:
40 pass
41
42
43 #--------------------------------------------------------------------------
44 # Class factory static method
45 #--------------------------------------------------------------------------
46
47
51 @staticmethod
52 def CreateLogger() -> ILogger:
53 return NullLogger()
54
@ Close
Window is asked to close itself, generally sent by the window itself in response to a button up in a ...
Represents an implementation of a logger object as called from the Logger class.
Represents a logger that throws away anything sent its way.
None LogError(self, str msg)
Log error messages to the configured output.
None LogTrace(self, str msg)
Log trace messages to the configured output.
ILogger CreateLogger()
Create an instance of a null logger, a logger that doesn't do anything.
None LogInfo(self, str msg)
Log informational messages to the configured output.