Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1206

Support multiple log files in groovy config

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

    Description

      I think all that is needed is to support the following.

      logback.groovy
      appender('2ndAppender', ConsoleAppender) {
          encoder(PatternLayoutEncoder) {
              pattern = logPattern
          }
      }
      logger('com.xyz', DEBUG) {
          // this is the part that doesn't work
          appenderRef = '2ndAppender'
      }
      
      output
      Caused by: groovy.lang.MissingMethodException: No signature of method: Script1.logger() is applicable for argument types: (java.lang.String, ch.qos.logback.classic.Level, Script1$_run_closure4)
      

      For xml config it looks like this is possible stackoverflow

      Attachments

        Activity

          People

            logback-dev Logback dev list
            btilford Ben Tilford
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: