Solr
  1. Solr
  2. SOLR-7590

Finish and improve MDC logging support.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    1. SOLR-7950.patch
      161 kB
      Mark Miller
    2. SOLR-7950.patch
      161 kB
      Mark Miller
    3. SOLR-7950.patch
      160 kB
      Mark Miller
    4. SOLR-7950.patch
      158 kB
      Mark Miller
    5. SOLR-7950.patch
      157 kB
      Mark Miller
    6. SOLR-7950.patch
      151 kB
      Mark Miller
    7. SOLR-7950.patch
      129 kB
      Mark Miller
    8. SOLR-7950.patch
      124 kB
      Mark Miller
    9. SOLR-7950.patch
      123 kB
      Mark Miller
    10. SOLR-7950.patch
      111 kB
      Mark Miller
    11. SOLR-7950.patch
      34 kB
      Mark Miller

      Issue Links

        Activity

        Hide
        Mark Miller added a comment -

        I tried to debug some jenkins logs today and realized a bunch of this logging is incomplete and buggy.

        Show
        Mark Miller added a comment - I tried to debug some jenkins logs today and realized a bunch of this logging is incomplete and buggy.
        Hide
        Mark Miller added a comment -

        The Overseer uses MDC logging all wrong IMO. The logging should identify the active core, not the core being operated on by overseer actions.

        Show
        Mark Miller added a comment - The Overseer uses MDC logging all wrong IMO. The logging should identify the active core, not the core being operated on by overseer actions.
        Hide
        Mark Miller added a comment -

        Getting closer to something reasonable.

        Show
        Mark Miller added a comment - Getting closer to something reasonable.
        Hide
        Mark Miller added a comment -

        I've also unified our context logging solution - we can't maintain one approach for tests and another for production.

        Show
        Mark Miller added a comment - I've also unified our context logging solution - we can't maintain one approach for tests and another for production.
        Hide
        Mark Miller added a comment -

        Okay, now it's fairly solid.

        Show
        Mark Miller added a comment - Okay, now it's fairly solid.
        Hide
        Mark Miller added a comment -

        I've tweaked the heck out of this to make the logging as nice and complete and universal as I could.

        Show
        Mark Miller added a comment - I've tweaked the heck out of this to make the logging as nice and complete and universal as I could.
        Hide
        Mark Miller added a comment -

        The logging should identify the active core, not the core being operated on by overseer actions.

        I think if the Overseer needs better logging around what it's doing, that should be logged specifically. Lot's not overload how we use this context.

        Show
        Mark Miller added a comment - The logging should identify the active core, not the core being operated on by overseer actions. I think if the Overseer needs better logging around what it's doing, that should be logged specifically. Lot's not overload how we use this context.
        Hide
        ASF subversion and git services added a comment -

        Commit 1682020 from Mark Miller in branch 'dev/trunk'
        [ https://svn.apache.org/r1682020 ]

        SOLR-7590: Finish and improve MDC context logging support.

        Show
        ASF subversion and git services added a comment - Commit 1682020 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1682020 ] SOLR-7590 : Finish and improve MDC context logging support.
        Hide
        ASF subversion and git services added a comment -

        Commit 1682031 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1682031 ]

        SOLR-7590: Finish and improve MDC context logging support.

        Show
        ASF subversion and git services added a comment - Commit 1682031 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1682031 ] SOLR-7590 : Finish and improve MDC context logging support.
        Hide
        Mark Miller added a comment -

        Looks like 5x is failing because the Supplier code is Java 8. Still trying to figure out how this appears to work on my dev machine even when running with a java 7 jvm...

        Show
        Mark Miller added a comment - Looks like 5x is failing because the Supplier code is Java 8. Still trying to figure out how this appears to work on my dev machine even when running with a java 7 jvm...
        Hide
        ASF subversion and git services added a comment -

        Commit 1682057 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1682057 ]

        SOLR-7590: Java8 code -> Java7 for branch_5x.

        Show
        ASF subversion and git services added a comment - Commit 1682057 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1682057 ] SOLR-7590 : Java8 code -> Java7 for branch_5x.
        Hide
        Mark Miller added a comment -

        Might be some tweaking we still want to do, but we can open up further issues.

        Show
        Mark Miller added a comment - Might be some tweaking we still want to do, but we can open up further issues.
        Hide
        Uwe Schindler added a comment - - edited

        Hi Mark,

        I am wondering why you be so verbose in Java 8's code. The main reason for ThreadLocal.withInitial() is to use it like that:

        private static final ThreadLocal<Integer> CALL_DEPTH = ThreadLocal.withInitial(() -> 0);
        

        Using a Supplier without a lambda is not the intention behind this method /API
        In Java 7, you can use the code like this fix comitted. If you want it verbose in Java 8, I would also use the Java 7 code...

        Uwe

        Show
        Uwe Schindler added a comment - - edited Hi Mark, I am wondering why you be so verbose in Java 8's code. The main reason for ThreadLocal.withInitial() is to use it like that: private static final ThreadLocal< Integer > CALL_DEPTH = ThreadLocal.withInitial(() -> 0); Using a Supplier without a lambda is not the intention behind this method /API In Java 7, you can use the code like this fix comitted. If you want it verbose in Java 8, I would also use the Java 7 code... Uwe
        Hide
        Mark Miller added a comment - - edited

        I filed SOLR-7699 so I won't lose this.

        Show
        Mark Miller added a comment - - edited I filed SOLR-7699 so I won't lose this.
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Mark Miller
            Reporter:
            Mark Miller
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development