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

provide thread abbreviation, thread{length} akin to logger{length}

    XMLWordPrintable

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • logback-core

    Description

      It would be helpful to be able to abbreviate thread names for the same reasons that we like to abbreviate logger names.

      Whereas logger

      {x} splits on "." or "$", thread{x}

      would at least split on "-". E.g.,

      Conversion Specifier Thread name Result
      %thread http-nio-8080-exec-15 http-nio-8080-exec-15
      %thread

      {0}

      http-nio-8080-exec-15 15
      %thread

      {1}

      http-nio-8080-exec-15 h-n-8-e-15
      %thread

      {5}

      http-nio-8080-exec-15 http-nio-8080-exec-15

      With respect to splitting on "-", I have also seen thread names that look like:

      ajp-bio-/127.0.0.1-8009-exec-10

      This would not split nicely on ".".

      Attachments

        Activity

          People

            logback-dev Logback dev list
            broc.seib Broc Seib
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: