1 45 package org.openejb.alt.containers.castor_cmp11; 46 47 import org.openejb.util.Logger; 48 49 53 public class CMPLogger implements org.exolab.castor.persist.spi.LogInterceptor { 54 protected final Logger logger = Logger.getInstance( "OpenEJB.CastorCMP", "org.openejb.alt.util.resources" ); 55 protected final String db; 56 57 public CMPLogger(String db) { 58 this.db=db+": "; 59 } 60 61 public void loading(java.lang.Object objClass, java.lang.Object identity) { 62 logger.debug(db+"Loading an instance of "+objClass+" with identity \""+identity+"\""); 63 } 64 public void creating(java.lang.Object objClass, java.lang.Object identity) { 65 logger.debug(db+"Creating an instance of "+objClass+" with identity \""+identity+"\""); 66 } 67 68 public void removing(java.lang.Object objClass, java.lang.Object identity) { 69 logger.debug(db+"Removing an instance of "+objClass+" with identity \""+identity+"\""); 70 } 71 72 public void storing(java.lang.Object objClass, java.lang.Object identity) { 73 logger.debug(db+"Storing an instance of "+objClass+" with identity \""+identity+"\""); 74 } 75 76 public void storeStatement(java.lang.String statement) { 77 logger.debug(db+statement); 78 } 79 80 public void queryStatement(java.lang.String statement) { 81 logger.debug(db+statement); 82 } 83 84 public void message(java.lang.String message) { 85 logger.info(db+"JDO message:"+message); 86 } 87 88 public void exception(java.lang.Exception ex) { 89 logger.info(db+"JDO exception:", ex); 90 } 91 92 public java.io.PrintWriter getPrintWriter() { 93 return null; 94 } 95 } 96 97 | Popular Tags |