|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
See:
Description
| Interface Summary | |
|---|---|
| Log | A very simple logger used in this project. |
| Class Summary | |
|---|---|
| AbstractLog | An abstract log implements the basic traits of
any Log implementation. |
| AppendableLog | An appendable log uses an Appendable object as
the target for log messages, for example a PrintStream
such as System.out. |
| FileLog | A file log logs to a given file based on the class a given log is associated with, if any, or to the default log represented by a single physical log file. |
| LogFactory | The log factory is the public interface to create and
access logs. |
| LogManager | A simple log manager to create and deliver logs to use, either globally or per unique class. |
| NullLog | A null log discards all logged messages regardless if active or not. |
Defines the simple log model used throughout this project, including system out loggers and file loggers.
Implementation notes:
The log design is flawed. It should have used the Bridge
pattern to separate the log (abstraction) from the output buffer (implementation).
Hence, an implementation should target System.out, another a file, etc.
As it is now, problems can occur while flushing because the test for new lines is
only done per log, not per output buffer. Alas, no time to change it...
|
Gunni Rode / rode.dk | ||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||