Log class supports customization through the
install method, which allows a subclass to be plugged in. This subclass can override some of the methods to modify logging behavior to some extent. However, there are limitations to this approach. For example, a subclass cannot access the private variable
fileWriteEnabled , as there are no
setter methods for it. In order to adapt logging in a more significant way, we shall subclass
Log but refrain from plugging it into a log object. Instead, we shall use the subclass directly to provide the desired functionalities.
There are three main objectives that we would like our custom class to meet. These are: