/** * PUBLIC: * <p> * Log a throwable with level. * </p><p> * * @param level the log request level value * </p><p> * @param throwable a Throwable * </p> */ public void logThrowable(int level, Throwable throwable) { // Must not create the log if not logging as is a performance issue. if (shouldLog(level)) { log(new SessionLogEntry(null, level, null, throwable)); } }
/** * INTERNAL: * <p> * Log a message. shouldTranslate determines if the message needs to be translated. * </p><p> * * @param level the log request level * </p><p> * @param message the string message * </p><p> * @param params array of parameters to the message * </p><p> * @param shouldTranslate true if the message needs to be translated * </p> */ public void log(int level, String message, Object[] params, boolean shouldTranslate) { if (!shouldLog(level)) { return; } log(new SessionLogEntry(level, null, message, params, null, shouldTranslate)); }
/** * PUBLIC: * <p> * Log a throwable at FINER level. * </p><p> * * @param throwable a Throwable * </p> */ public void throwing(Throwable throwable) { if (shouldLog(FINER)) { SessionLogEntry entry = new SessionLogEntry(null, throwable); entry.setLevel(FINER); log(entry); } }
/** * PUBLIC: * <p> * Log a throwable with level and category. * </p><p> * * @param level the log request level value * </p><p> * @param category the string representation of a TopLink category. * </p><p> * @param throwable a Throwable * </p> */ public void logThrowable(int level, String category, Throwable throwable) { // Must not create the log if not logging as is a performance issue. if (shouldLog(level, category)) { startOperationProfile(SessionProfiler.Logging); log(new SessionLogEntry(this, level, category, throwable)); endOperationProfile(SessionProfiler.Logging); } }
/** * INTERNAL: * <p> * Log a message with level, parameters and accessor. shouldTranslate determines if the message needs to be translated. * </p><p> * * @param level the log request level value * </p><p> * @param message the string message * </p><p> * @param params array of parameters to the message * </p><p> * @param accessor the connection that generated the log entry * </p><p> * @param shouldTranslate true if the message needs to be translated. * </p> */ public void log(int level, String message, Object[] params, Accessor accessor, boolean shouldTranslate) { if (shouldLog(level, null)) { startOperationProfile(SessionProfiler.Logging); log(new SessionLogEntry(level, this, message, params, accessor, shouldTranslate)); endOperationProfile(SessionProfiler.Logging); } }
/** * INTERNAL: * <p> * Log a message with level, category, parameters and accessor. shouldTranslate determines if the message needs to be translated. * </p><p> * * @param level the log request level value * </p><p> * @param message the string message * </p><p> * @param params array of parameters to the message * </p><p> * @param accessor the connection that generated the log entry * </p><p> * @param category the string representation of a TopLink category. * </p><p> * @param shouldTranslate true if the message needs to be translated. * </p> */ public void log(int level, String category, String message, Object[] params, Accessor accessor, boolean shouldTranslate) { if (shouldLog(level, category)) { startOperationProfile(SessionProfiler.Logging); log(new SessionLogEntry(level, category, this, message, params, accessor, shouldTranslate)); endOperationProfile(SessionProfiler.Logging); } }
uow.log(new SessionLogEntry(uow, SessionLog.WARNING, SessionLog.TRANSACTION, exception));
uow.log(new SessionLogEntry(uow, SessionLog.WARNING, SessionLog.TRANSACTION, rtEx));