6from .bridge_logger
import Logger
18 logger.LogTrace(
"Starting log to {0} example".format(loggerType))
19 logger.LogInfo(
"An example of an informational line")
20 logger.LogError(
"An example of an error log entry")
21 logger.LogTrace(
"Done with log to {0} example".format(loggerType))
36 print(
"Bridge Exercise")
38 with Logger(Logger.LoggerTypes.ToFile,
"Bridge.log")
as logger:
39 print(
" Example of writing to a log file...")
42 with Logger(Logger.LoggerTypes.ToConsole)
as logger:
43 print(
" Example of writing to the console...")
46 with Logger(Logger.LoggerTypes.ToNull)
as logger:
47 print(
" Example of writing to a Null object (no output)...")
Represents the bridge logger object to be used in the program.
def Bridge_Exercise()
Example of using the Bridge Pattern.
None _Bridge_Exercise_Demonstrate_Logging(Logger logger, str loggerType)
Helper function to show an example of writing to a logger.