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

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

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:

      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 ".".

        Activity

        Hide
        noreply.ceki@qos.ch Ceki Gulcu added a comment -

        May I ask you to submit a patch, preferable in the form of a github pull request?

        Show
        noreply.ceki@qos.ch Ceki Gulcu added a comment - May I ask you to submit a patch, preferable in the form of a github pull request?

          People

          • Assignee:
            logback-dev@qos.ch Logback dev list
            Reporter:
            broc.seib Broc Seib
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: