You can clone with
No one assigned
Pluggable logging functionalities that wrap around systems such as Zend_Log or Drupal's watchdog should be implemented by this library to capture errors and debugging information.
UPDATE: Implementing the observer pattern should work fine without explicitly adding the loggers.
Perhaps make use of the Observer pattern and have the Parser implement SplSubject?
My first reaction is that this seems like a perfect use case for the observer pattern. The SplObserver class would be a good abstraction for any framework's logger. The way I see this working is that the parser would have to implement some method to get the last error or message. Maybe something like a setMessage($message, $severity) method, and then the observer can call the getMessage() and getSeverity() classes? Thoughts?
Created the "logging" branch for this at https://github.com/cpliakas/Nagiostatus/tree/logging.
That'll work for most simple cases - you may consider having addMessage() instead which adds the message to an array, and then have getLastMessage() return the last element of that array. One use case is that a number of successful status messages could be set representing a chain of steps, which is very useful for debugging when things go wrong. You could also have the notion of getLastError() that would return the latest message of a certain severity.
I added the observer pattern implementation to the logging branch. master...logging
fixed #3: Implemented observer pattern which will provide the ability…
… for third party loggers.