Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0, avatica-1.7.0
    • Component/s: avatica
    • Labels:
      None

      Description

      As mentioned on CALCITE-641, it could be useful to adopt a logging implementation that supports pluggable backends and has MDC support.

        Issue Links

          Activity

          Hide
          elserj Josh Elser added a comment -

          Resolved in release Avatica 1.7.0

          Show
          elserj Josh Elser added a comment - Resolved in release Avatica 1.7.0
          Show
          elserj Josh Elser added a comment - Done in https://git1-us-west.apache.org/repos/asf?p=calcite.git;a=commit;h=05a57992a45f9aa66db31355aa7733cfadafa1e1
          Hide
          elserj Josh Elser added a comment -

          Ok, thanks, Julian.

          Show
          elserj Josh Elser added a comment - Ok, thanks, Julian.
          Hide
          julianhyde Julian Hyde added a comment - - edited

          Josh Elser, Yes, commits are open following the release, and you can use your discretion as a committer. You'll probably hit a conflict in pom.xml due to CALCITE-999 https://github.com/apache/calcite/commit/4d58768d35d5accbf7330d10b91f2541b6f1ab38.

          Show
          julianhyde Julian Hyde added a comment - - edited Josh Elser , Yes, commits are open following the release, and you can use your discretion as a committer. You'll probably hit a conflict in pom.xml due to CALCITE-999 https://github.com/apache/calcite/commit/4d58768d35d5accbf7330d10b91f2541b6f1ab38 .
          Hide
          elserj Josh Elser added a comment -

          Julian Hyde, am I good to merge this into master? Not sure if I missed an "all-clear" from you, but it looks like you've dotted the "i"s and crossed the "t"s.

          Show
          elserj Josh Elser added a comment - Julian Hyde , am I good to merge this into master? Not sure if I missed an "all-clear" from you, but it looks like you've dotted the "i"s and crossed the "t"s.
          Hide
          elserj Josh Elser added a comment -

          Nevermind about all that. It seems like this was a side-effect of relocating the slf4j-api classes in the calcite-avatica jar. Once I stopped relocating them, everything worked fine :sigh:

          Show
          elserj Josh Elser added a comment - Nevermind about all that. It seems like this was a side-effect of relocating the slf4j-api classes in the calcite-avatica jar. Once I stopped relocating them, everything worked fine :sigh:
          Hide
          elserj Josh Elser added a comment -

          Argh: http://jira.qos.ch/browse/SLF4J-167 targeted to be fixed in 1.7.14. I'll have to see if there is a simple workaround – it would be a pain to hit this when trying to debug a test.

          Show
          elserj Josh Elser added a comment - Argh: http://jira.qos.ch/browse/SLF4J-167 targeted to be fixed in 1.7.14. I'll have to see if there is a simple workaround – it would be a pain to hit this when trying to debug a test.
          Hide
          elserj Josh Elser added a comment -

          I have this mostly working, one thing I'm trying to track down are some spurious warnings while running the tests:

          SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
          SLF4J: Defaulting to no-operation (NOP) logger implementation
          SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
          

          My only guess at this point is that there is some issue with loading things with the parallel test runner. Right after the above, we can see the logging is set up and functional.

          Running org.apache.calcite.avatica.jdbc.JdbcMetaTest
          Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in org.apache.calcite.avatica.jdbc.JdbcMetaTest
          2016-01-19 18:25:42,802 [pool-1-thread-3] INFO  - jetty-9.2.7.v20150116
          2016-01-19 18:25:42,803 [pool-1-thread-3] INFO  - Started ServerConnector@7639fabd{HTTP/1.1}{0.0.0.0:51067}
          2016-01-19 18:25:42,803 [pool-1-thread-3] INFO  - Started @771ms
          2016-01-19 18:25:42,804 [pool-1-thread-3] INFO  - Service listening on port 51067.
          2016-01-19 18:25:42,804 [pool-1-thread-3] INFO  - jetty-9.2.7.v20150116
          2016-01-19 18:25:42,806 [pool-1-thread-3] INFO  - Started ServerConnector@7a8c4ce2{HTTP/1.1}{0.0.0.0:51068}
          2016-01-19 18:25:42,806 [pool-1-thread-3] INFO  - Started @774ms
          2016-01-19 18:25:42,806 [pool-1-thread-3] INFO  - Service listening on port 51068.
          

          I can say it's functional because this is the format I specified in the log4j.properties file. I need to see if there is some sort of work around to this – the parallel tests cause such trouble :\

          Show
          elserj Josh Elser added a comment - I have this mostly working, one thing I'm trying to track down are some spurious warnings while running the tests: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. My only guess at this point is that there is some issue with loading things with the parallel test runner. Right after the above, we can see the logging is set up and functional. Running org.apache.calcite.avatica.jdbc.JdbcMetaTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in org.apache.calcite.avatica.jdbc.JdbcMetaTest 2016-01-19 18:25:42,802 [pool-1-thread-3] INFO - jetty-9.2.7.v20150116 2016-01-19 18:25:42,803 [pool-1-thread-3] INFO - Started ServerConnector@7639fabd{HTTP/1.1}{0.0.0.0:51067} 2016-01-19 18:25:42,803 [pool-1-thread-3] INFO - Started @771ms 2016-01-19 18:25:42,804 [pool-1-thread-3] INFO - Service listening on port 51067. 2016-01-19 18:25:42,804 [pool-1-thread-3] INFO - jetty-9.2.7.v20150116 2016-01-19 18:25:42,806 [pool-1-thread-3] INFO - Started ServerConnector@7a8c4ce2{HTTP/1.1}{0.0.0.0:51068} 2016-01-19 18:25:42,806 [pool-1-thread-3] INFO - Started @774ms 2016-01-19 18:25:42,806 [pool-1-thread-3] INFO - Service listening on port 51068. I can say it's functional because this is the format I specified in the log4j.properties file. I need to see if there is some sort of work around to this – the parallel tests cause such trouble :\
          Hide
          elserj Josh Elser added a comment -

          I suppose "FINE" could also be put at the INFO level . It doesn't seem like we have much coming out at that level anyways.

          Show
          elserj Josh Elser added a comment - I suppose "FINE" could also be put at the INFO level . It doesn't seem like we have much coming out at that level anyways.
          Hide
          elserj Josh Elser added a comment -

          Anyone have opinions on how to map the 3 levels from java logging to the 2 which slf4j provide?

          Java Logging

          • FINE
          • FINER
          • FINEST

          Slf4j Levels

          • DEBUG
          • TRACE

          What kind of breakdown would we want here? DEBUG == (FINE and FINER), TRACE == FINEST? DEBUG == FINE, TRACE == (FINER and FINEST)?

          Show
          elserj Josh Elser added a comment - Anyone have opinions on how to map the 3 levels from java logging to the 2 which slf4j provide? Java Logging FINE FINER FINEST Slf4j Levels DEBUG TRACE What kind of breakdown would we want here? DEBUG == (FINE and FINER), TRACE == FINEST? DEBUG == FINE, TRACE == (FINER and FINEST)?
          Hide
          elserj Josh Elser added a comment -

          Thanks for the reminder. Will look at the docs.

          Show
          elserj Josh Elser added a comment - Thanks for the reminder. Will look at the docs.
          Hide
          julianhyde Julian Hyde added a comment -

          +1

          As part of this task, be sure to update the existing doc, such as the HOWTO.

          Show
          julianhyde Julian Hyde added a comment - +1 As part of this task, be sure to update the existing doc, such as the HOWTO.
          Hide
          elserj Josh Elser added a comment -

          Going to work on swapping this out.

          Show
          elserj Josh Elser added a comment - Going to work on swapping this out.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          Bulk edit assigning avatica component to obvious issues.

          Show
          ndimiduk Nick Dimiduk added a comment - Bulk edit assigning avatica component to obvious issues.
          Hide
          julianhyde Julian Hyde added a comment -

          +1 I have no particular love for commons-logging.

          Show
          julianhyde Julian Hyde added a comment - +1 I have no particular love for commons-logging.

            People

            • Assignee:
              elserj Josh Elser
              Reporter:
              ndimiduk Nick Dimiduk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development