1 /* 2 * Copyright (C) The Apache Software Foundation. All rights reserved. 3 * 4 * This software is published under the terms of the Apache Software License 5 * version 1.1, a copy of which has been included with this distribution in 6 * the LICENSE file. 7 */ 8 package org.jivesoftware.util.log; 9 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 } 26