Exercise: Logging with Strategy
Practice how to create a logging component that accepts a strategy to define where the log messages are sent.
We'll cover the following...
Problem statement
Implement a logging component having at least the following methods: debug()
, info()
, warn()
, and error()
. The logging component should also accept a strategy that defines where the log messages are sent. For example, we might have ConsoleStrategy
to send the messages to the console, or ...