Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2217

Simple extension of jboss Logger with a log() primitive that maps dynamically to a log level.

XMLWordPrintable

    • 0
    • 0% 0%

      An extension of the JBoss Logger that adds a log() primitive that maps to a dynamically defined log level.

      Example usage:

      private static final DynamicLogger log = DynamicLogger.getDynamicLogger(clazz);

      ...
      log.setLogLevel(LOG_LEVEL_INFO);
      or
      log.setLogLevelAsString("INFO");
      ...
      log.debug(..) // as usual
      if (log.isTraceEnabled())
      log.trace(..) // as usual
      ...
      log.log("A message"); // logged at INFO
      ...
      log.setLogLevel(LOG_LEVEL_DEBUG);
      ...
      log.log("Another message"); // logged as DEBUG

            dandread1@redhat.com Dimitrios Andreadis
            dandread1@redhat.com Dimitrios Andreadis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: