001/*
002 * HapiLog.java
003 * 
004 * Created on May 7, 2003 at 3:53:44 PM
005 */
006package ca.uhn.log;
007
008import org.slf4j.Logger;
009
010/**
011 * 
012 * Instantiate using {@link HapiLogFactory#getLog( Class clazz)}
013 * or {@link HapiLogFactory#getLog( String name)}
014 * 
015 * <pre>
016 *  USASE PATTERN:
017 *  (look at the jakarta-commons-logging and log4j documentation first)
018 * 
019 *      ...
020 *      import ca.uhn.log.*;
021 *      ...
022 *      class A {
023 *          private static final HapiLog log = HapiLogFactory.getHapiLog( A.class );
024 * 
025 *          public boolean methodA( Object param1 ) {
026 *              boolean retVal = true;
027 * 
028 *              //log debug messages (to be printed only when the debug mode is specified
029 *              //in the configuration file)
030 *              log.debug( "param1 = " + param1 );
031 *              
032 *              Object copy = null;
033 *              try {
034 *                  copy = param1.clone();
035 *              }
036 *              catch( CloneNotSupportedException e ) {
037 *                  //log the error
038 *                  log.error( "param1 must be cloneable", e );
039 *                  retVal = false;
040 *              }
041 * 
042 *              log.debug( "retVal = " + retVal );
043 *              return retVal;
044 *          }
045 * 
046 *          ...
047 * 
048 *      }
049 * </pre>
050 * 
051 * @author <a href="mailto:alexei.guevara@uhn.on.ca">Alexei Guevara</a>
052 * @deprecated use slf4j Logger directly
053 */
054public interface HapiLog extends Logger {
055
056        /**
057         * @deprecated not available in sl4j. Use {@link #error(String, Throwable)}
058         */
059        void error(Exception e);
060
061}