Functions | |
None | _Bridge_Exercise_Demonstrate_Logging (Logger logger, str loggerType) |
Helper function to show an example of writing to a logger. | |
def | Bridge_Exercise () |
Example of using the Bridge Pattern. | |
|
protected |
Helper function to show an example of writing to a logger.
This is called for all types of loggers, showing how the Logger class hides the details of the underlying implementation.
logger | A Logger instance to log to |
loggerType | The type of the underlying implementation. |
Definition at line 17 of file bridge_exercise.py.
Referenced by DesignPatternExamples_python.bridge.bridge_exercise.Bridge_Exercise().
def Bridge_Exercise | ( | void | ) |
Example of using the Bridge Pattern.
The Bridge pattern is used to allow a program to offer multiple ways to perform logging without changing how the logging is used throughout the program.
In this exercise, note how the calls into the logger are the same regardless of the logger used.
Definition at line 34 of file bridge_exercise.py.
References DesignPatternExamples_python.bridge.bridge_exercise._Bridge_Exercise_Demonstrate_Logging().