/** * Send a trace message to the log. A trace message is the most detailed logging level, used to * trace system execution for really nasty problems. At this level, logging will be so verbose * that the system performance may be affected. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param context the context for this log message (for example, the component that is generating * this message). * @param e the exception that is to be logged; the message is not logged if this parameter is * null * @param msgParts the individual parts of the log message (may be null) */ public static void logTrace(String context, Throwable e, Object... msgParts) { logMessage(MessageLevel.TRACE, context, e, msgParts); }
/** * Send a message of the specified level to the log. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param msgLevel * @param context the context for this log message (for example, the component that is generating * this message). * @param message the individual parts of the log message; the message is not logged if this * parameter is null */ public static void log(int msgLevel, String context, Object message) { logMessage(msgLevel, context, message); }
/** * Send a detail message to the log. Such messages are moderately detailed, and help to debug * typical problems in the system. Generally, these messages are not so detailed that the big * picture gets lost. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param context the context for this log message (for example, the component that is generating * this message). * @param msgParts the individual parts of the log message; the message is not logged if this * parameter is null */ public static void logDetail(String context, Object... msgParts) { logMessage(MessageLevel.DETAIL, context, msgParts); }
/** * Send a information message to the log. This level of logging is the usually the normal level. * All interesting periodic events should be logged at this level so someone looking through the * log can see the amount and kind of processing happening in the system. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param context the context for this log message (for example, the component that is generating * this message). * @param message the log message; the message is not logged if this parameter is null */ public static void logInfo(String context, Object message) { logMessage(MessageLevel.INFO, context, message); }
/** * Send a warning message to the log. Warning messages generally described expected errors from * which the system should recover. However, this level is used to record the fact that such an * error or event did occur. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param context the context for this log message (for example, the component that is generating * this message). * @param message the log message; the message is not logged if this parameter is null */ public static void logWarning(String context, Object message) { logMessage(MessageLevel.WARNING, context, message); }
/** * Send an error message to the log. Error messages are generally used to record unexpected * problems, or errors that are not critical in nature and from which the system can automatically * recover. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param context the context for this log message (for example, the component that is generating * this message). * @param message the log message; the message is not logged if this parameter is null */ public static void logError(String context, Object message) { logMessage(MessageLevel.ERROR, context, message); }
/** * Send a critical message to the log. This level of message is generally used to record an event * or error that must be recorded (if any logging is used). If it is used to record an error, it * generally means that the system encountered a critical error which affects the integrity, * accuracy, reliability and/or capability of the system. * * <p>Only if the log manager is configured to send such messages to the destination will the * message be recorded. * * @param context the context for this log message (for example, the component that is generating * this message). * @param message the log message; the message is not logged if this parameter is null */ public static void logCritical(String context, Object message) { logMessage(MessageLevel.CRITICAL, context, message); }