01: /*
02: * Copyright (C) The Apache Software Foundation. All rights reserved.
03: *
04: * This software is published under the terms of the Apache Software License
05: * version 1.1, a copy of which has been included with this distribution in
06: * the LICENSE file.
07: */
08: package org.jivesoftware.util.log;
09:
10: /**
11: * Handle unrecoverable errors that occur during logging.
12: * Based on Log4js notion of ErrorHandlers.
13: *
14: * @author <a href="mailto:peter@apache.org">Peter Donald</a>
15: */
16: public interface ErrorHandler {
17: /**
18: * Log an unrecoverable error.
19: *
20: * @param message the error message
21: * @param throwable the exception associated with error (may be null)
22: * @param event the LogEvent that caused error, if any (may be null)
23: */
24: void error(String message, Throwable throwable, LogEvent event);
25: }
|