Commons Logging
  1. Commons Logging
  2. LOGGING-110

Implement a Level class and a generic log method in Log

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      The Log API does not have a generic log method and there is no generic Level class. Since the levels which commons logging provides are fixed and since it would not break backwards compatibiliy I would like to suggest that these are added. To be more specific, I would like to see the following methods added:

      void log(Level level, Object message)
      Log a message with the specified log level.

      void log(Level level, Object message, Throwable t)
      Log a message and exception with the specified log level.

      boolean isEnabled(Level level)
      Is the specified logging level currently enabled?

      As an extra feature of the level class one could have string and integer conversions to and from log levels.

      These features would allow one to use commons logging in more complex situations without have to rely on specific logging implementations.

      1. TestLogLevel.java
        8 kB
        Alexander Pogrebnyak
      2. LogLevel.java
        9 kB
        Alexander Pogrebnyak

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Sebastiaan van Erk
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development