Package javolution.context

Examples of javolution.context.LogContext


     * @param level the message logging level
     * @return <code>true</code> if a message of specified level would actually
     *        be logged;<code>false</code> otherwise.
     */
    public static boolean isLoggable(Level level) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            return ((StandardLog) log)._logger.isLoggable(level);
        } else if (level.intValue() >= Level.SEVERE.intValue()) {
            return LogContext.isErrorLogged();
        } else if (level.intValue() >= Level.WARNING.intValue()) {
View Full Code Here


     * or {@link LogContext#debug debug} message is possibly logged.
     *
     * @param record the LogRecord to be published.
     */
    public static void log(LogRecord record) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.log(record);
        } else {
            Throwable error = record.getThrown();
            if (error != null) {
View Full Code Here

     * error} message is logged.
     *
     * @param msg the severe message.
     */
    public static void severe(String msg) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.severe(msg);
        } else {
            LogContext.warning(msg);
        }
View Full Code Here

     * context is not a {@link StandardLog} no message is logged.
     *
     * @param msg the config message.
     */
    public static void config(String msg) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.config(msg);
        }
    }
View Full Code Here

     * context is not a {@link StandardLog} no message is logged.
     *
     * @param msg the fine message.
     */
    public static void fine(String msg) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.fine(msg);
        }
    }
View Full Code Here

     * context is not a {@link StandardLog} no message is logged.
     *
     * @param msg the finer message.
     */
    public static void finer(String msg) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.finer(msg);
        }
    }
View Full Code Here

     * context is not a {@link StandardLog} no message is logged.
     *
     * @param msg the finest message.
     */
    public static void finest(String msg) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.finest(msg);
        }
    }
View Full Code Here

     * @param sourceMethod name of the method.
     * @param thrown the error that is being thrown.
     */
    public static void throwing(String sourceClass, String sourceMethod,
            Throwable thrown) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.throwing(sourceClass, sourceMethod,
                    thrown);
        } else {
            LogContext.error(thrown, "Thrown by " + sourceClass + "." + sourceMethod);
View Full Code Here

     *
     * @param sourceClass name of class that issued the logging request.
     * @param sourceMethod name of method that is being entered.
     */
    public static void entering(String sourceClass, String sourceMethod) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.entering(sourceClass, sourceMethod);
        } else {
             LogContext.debug("Entering " + sourceClass + "." + sourceMethod);
        }
View Full Code Here

     *
     * @param sourceClass name of class that issued the logging request.
     * @param sourceMethod name of method that is being returned.
     */
    public static void exiting(String sourceClass, String sourceMethod) {
        LogContext log = (LogContext) LogContext.getCurrentLogContext();
        if (log instanceof StandardLog) {
            ((StandardLog) log)._logger.exiting(sourceClass, sourceMethod);
        } else {
             LogContext.debug("Exiting " + sourceClass + "." + sourceMethod);
        }
View Full Code Here

TOP

Related Classes of javolution.context.LogContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.