Interface Logger

  • All Known Implementing Classes:
    AbstractLogger, AntLogger, FileLogger, MavenLogger, NullLogger, SimpleLogger

    public interface Logger
    Simple interface for logging and tracing. The reason we don't use commons-logging or some other logging library is because Cargo is a framework. As such we don't want to force the user to include an additional library and more importantly we want to remain open so that applications using Cargo will be able to adapt it to their favorite logging system, whatever that is.
    • Method Detail

      • setLevel

        void setLevel​(LogLevel level)
        Parameters:
        level - the logging level above which the logger will log
      • getLevel

        LogLevel getLevel()
        Returns:
        the logging level above which the logger will log
      • info

        void info​(String message,
                  String category)
        Logger informational messages.
        Parameters:
        message - the message to log
        category - the log category (usually this is the full name of the class being logged but it can be anything)
      • warn

        void warn​(String message,
                  String category)
        Logger warning messages.
        Parameters:
        message - the message to log
        category - the log category (usually this is the full name of the class being logged but it can be anything)
      • debug

        void debug​(String message,
                   String category)
        Logger debug messages.
        Parameters:
        message - the message to log
        category - the log category (usually this is the full name of the class being logged but it can be anything)