1 21 package oracle.toplink.essentials.logging; 23 24 import java.io.Writer ; 25 import oracle.toplink.essentials.sessions.Session; 26 27 42 public interface SessionLog { 43 public static final int OFF = 8; 45 46 public static final int SEVERE = 7; 48 49 public static final int WARNING = 6; 51 52 public static final int INFO = 5; 54 55 public static final int CONFIG = 4; 57 58 public static final int FINE = 3; 60 61 public static final int FINER = 2; 63 64 public static final int FINEST = 1; 66 public static final int ALL = 0; 67 68 public static final String SQL = "sql"; 72 public static final String TRANSACTION = "transaction"; 73 public static final String EVENT = "event"; 74 public static final String CONNECTION = "connection"; 75 public static final String QUERY = "query"; 76 public static final String CACHE = "cache"; 77 public static final String PROPAGATION = "propagation"; 78 public static final String SEQUENCING = "sequencing"; 79 public static final String EJB = "ejb"; 80 public static final String DMS = "dms"; 81 public static final String EJB_ANNOTATION = "ejb_annotation"; 82 public static final String EJB_ORM = "ejb_orm"; 83 public static final String WEAVER = "weaver"; 84 public static final String PROPERTIES = "properties"; 85 public final String [] loggerCatagories = new String [] { SQL ,TRANSACTION ,EVENT ,CONNECTION ,QUERY ,CACHE ,PROPAGATION ,SEQUENCING ,EJB ,DMS ,EJB_ANNOTATION ,EJB_ORM ,WEAVER ,PROPERTIES}; 86 87 96 void log(SessionLogEntry entry); 97 98 102 boolean shouldLogExceptionStackTrace(); 103 104 107 boolean shouldPrintDate(); 108 109 112 boolean shouldPrintThread(); 113 114 117 boolean shouldPrintConnection(); 118 119 122 boolean shouldPrintSession(); 123 124 128 void setShouldLogExceptionStackTrace(boolean flag); 129 130 133 void setShouldPrintDate(boolean flag); 134 135 138 void setShouldPrintThread(boolean flag); 139 140 143 void setShouldPrintConnection(boolean flag); 144 145 148 void setShouldPrintSession(boolean flag); 149 150 156 Writer getWriter(); 157 158 164 void setWriter(Writer log); 165 166 170 int getLevel(); 171 172 177 int getLevel(String category); 178 179 183 void setLevel(int level); 184 185 190 void setLevel(int level, String category); 191 192 197 boolean shouldLog(int level); 198 199 204 boolean shouldLog(int level, String category); 205 206 211 void log(int level, String message); 212 213 217 public void log(int level, String message, Object param); 218 219 223 void log(int level, String message, Object param1, Object param2); 224 225 229 void log(int level, String message, Object param1, Object param2, Object param3); 230 231 236 void log(int level, String message, Object [] arguments); 237 238 243 void log(int level, String message, Object [] arguments, boolean shouldTranslate); 244 245 249 void throwing(Throwable throwable); 250 251 256 void severe(String message); 257 258 263 void warning(String message); 264 265 270 void info(String message); 271 272 277 void config(String message); 278 279 284 void fine(String message); 285 286 291 void finer(String message); 292 293 298 void finest(String message); 299 300 304 void logThrowable(int level, Throwable throwable); 305 306 310 Session getSession(); 311 312 316 void setSession(Session session); 317 } 318 | Popular Tags |