Class WrappedLogger

    • Field Detail

      • FQCN

        private static final java.lang.String FQCN
    • Method Detail

      • log

        public void log​(Level level,
                        java.lang.String message,
                        java.lang.Throwable t)
        Description copied from interface: Logger
        Logs a message at the given level including the stack trace of the Throwable throwable passed as parameter.
        Specified by:
        log in interface Logger
        Overrides:
        log in class AbstractLogger
        Parameters:
        level - the logging level
        message - the message to log.
        t - the Throwable to log, including its stack trace.
      • log

        public void log​(Level level,
                        java.lang.String message,
                        java.lang.Object... params)
        Description copied from interface: Logger
        Logs a message with parameters at the given level.
        Specified by:
        log in interface Logger
        Overrides:
        log in class AbstractLogger
        Parameters:
        level - the logging level
        message - the message to log; the format depends on the message factory.
        params - parameters to the message.
        See Also:
        Logger.getMessageFactory()
      • log

        public void log​(Level level,
                        java.lang.String message)
        Description copied from interface: Logger
        Logs a message object with the given level.
        Specified by:
        log in interface Logger
        Overrides:
        log in class AbstractLogger
        Parameters:
        level - the logging level
        message - the message string to log.
      • entry

        public void entry()
        Description copied from interface: Logger
        Logs entry to a method. Used when the method in question has no parameters or when the parameters should not be logged.
        Specified by:
        entry in interface Logger
        Overrides:
        entry in class AbstractLogger
      • entry

        public void entry​(java.lang.Object... params)
        Description copied from interface: Logger
        Logs entry to a method along with its parameters (consider using one of the traceEntry(...) methods instead.)

        For example:

         public void doSomething(String foo, int bar) {
             LOGGER.entry(foo, bar);
             // do something
         }
         

        The use of methods such as this are more effective when combined with aspect-oriented programming or other bytecode manipulation tools. It can be rather tedious (and messy) to use this type of method manually.

        Specified by:
        entry in interface Logger
        Overrides:
        entry in class AbstractLogger
        Parameters:
        params - The parameters to the method.
      • exit

        public void exit()
        Description copied from interface: Logger
        Logs exit from a method. Used for methods that do not return anything.
        Specified by:
        exit in interface Logger
        Overrides:
        exit in class AbstractLogger
      • exit

        public <R> R exit​(R result)
        Description copied from interface: Logger
        Logs exiting from a method with the result. This may be coded as:
         return LOGGER.exit(myResult);
         
        Specified by:
        exit in interface Logger
        Overrides:
        exit in class AbstractLogger
        Type Parameters:
        R - The type of the parameter and object being returned.
        Parameters:
        result - The result being returned from the method call.
        Returns:
        the result.
      • throwing

        public <T extends java.lang.Throwable> T throwing​(T t)
        Description copied from interface: Logger
        Logs a Throwable to be thrown at the ERROR level. This may be coded as:
         throw logger.throwing(myException);
         
        Specified by:
        throwing in interface Logger
        Overrides:
        throwing in class AbstractLogger
        Type Parameters:
        T - the Throwable type.
        Parameters:
        t - The Throwable.
        Returns:
        the Throwable.