Refactored to support multiple loggers