Whirr
  1. Whirr
  2. WHIRR-365

Too verbose command line interface logging

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.6.0
    • Component/s: cli
    • Labels:
      None

      Description

      When starting services using the command line interface I see a lot of messages like this:

      Attaching `session` channel (#31)
      Initialized - < session channel: id=31, recipient=1, localWin=[winSize=2097152], remoteWin=[winSize=0] >
      Sending channel request for `pty-req`
      Will request to exec `./jclouds-script-1313376230348 tailerr`
      Sending channel request for `exec`
      Received window adjustment for 2097152 bytes
      Got chan request for `exit-status`
      Got EOF
      Got close
      Sending EOF
      Sending close
      Forgetting `session` channel (#31)
      

      I guess they are generated by sshj.

      1. WHIRR-365-2.patch
        11 kB
        Andrei Savu
      2. WHIRR-365-2.patch
        3 kB
        Andrei Savu
      3. WHIRR-365.patch
        1 kB
        Andrei Savu

        Activity

        Hide
        Andrei Savu added a comment -

        I've committed the latest patch to trunk and 0.6.0 branch. I will prepare the artifacts for the RC tonight. Hopefully everything should be ok for a release.

        Show
        Andrei Savu added a comment - I've committed the latest patch to trunk and 0.6.0 branch. I will prepare the artifacts for the RC tonight. Hopefully everything should be ok for a release.
        Hide
        Tom White added a comment -

        +1 Looks good.

        Show
        Tom White added a comment - +1 Looks good.
        Hide
        Andrei Savu added a comment -

        Updated patch and I've done more testing. It looks like it's working as expected now. I've extracted the log4j.xml files outside src/ in a conf/ dir. Can someone check this? Thanks.

        Show
        Andrei Savu added a comment - Updated patch and I've done more testing. It looks like it's working as expected now. I've extracted the log4j.xml files outside src/ in a conf/ dir. Can someone check this? Thanks.
        Hide
        Andrei Savu added a comment -

        In this patch I've removed core/log4j.xml and added a filter for sshj messages to the log4j file in examples.

        It looks like the release binary build has the desired behavior now and the same is true when building from the source release.

        Was core/log4j.xml actually used? (I don't think so)

        Show
        Andrei Savu added a comment - In this patch I've removed core/log4j.xml and added a filter for sshj messages to the log4j file in examples. It looks like the release binary build has the desired behavior now and the same is true when building from the source release. Was core/log4j.xml actually used? (I don't think so)
        Hide
        Andrei Savu added a comment -

        It looks like we have many log4j.xml files in the project:

        ./cli/src/main/resources/log4j.xml
        ./core/src/test/resources/log4j.xml
        ./core/log4j.xml
        ./services/cdh/src/test/resources/log4j.xml
        ./services/hbase/src/test/resources/log4j.xml
        ./services/voldemort/src/test/resources/log4j.xml
        ./services/hadoop/src/test/resources/log4j.xml
        ./services/cassandra/src/test/resources/log4j.xml
        ./services/zookeeper/src/test/resources/log4j.xml
        ./examples/src/main/resources/log4j.xml
        

        I guess that outside the testing code we should probably have only one in cli? I will do some checking.

        Show
        Andrei Savu added a comment - It looks like we have many log4j.xml files in the project: ./cli/src/main/resources/log4j.xml ./core/src/test/resources/log4j.xml ./core/log4j.xml ./services/cdh/src/test/resources/log4j.xml ./services/hbase/src/test/resources/log4j.xml ./services/voldemort/src/test/resources/log4j.xml ./services/hadoop/src/test/resources/log4j.xml ./services/cassandra/src/test/resources/log4j.xml ./services/zookeeper/src/test/resources/log4j.xml ./examples/src/main/resources/log4j.xml I guess that outside the testing code we should probably have only one in cli? I will do some checking.
        Hide
        Andrei Savu added a comment -

        I'm reopening this because it seems like the patch only works for the development build but I still see a long list of log messages on the binary release.

        My guess is this is a classpath ordering issue generated by the fact that we have many log4j.xml files in the project. Should I update them all or are am I doing something wrong?

        Show
        Andrei Savu added a comment - I'm reopening this because it seems like the patch only works for the development build but I still see a long list of log messages on the binary release. My guess is this is a classpath ordering issue generated by the fact that we have many log4j.xml files in the project. Should I update them all or are am I doing something wrong?
        Hide
        Tom White added a comment -

        I will now cut the branch and prepare the release artifacts.

        Great! Note that the "incubating" tag is no longer needed in the release version.

        Show
        Tom White added a comment - I will now cut the branch and prepare the release artifacts. Great! Note that the "incubating" tag is no longer needed in the release version.
        Hide
        Andrei Savu added a comment -

        I've just committed this trivial change. I will now cut the branch and prepare the release artifacts.

        Show
        Andrei Savu added a comment - I've just committed this trivial change. I will now cut the branch and prepare the release artifacts.
        Hide
        Andrei Savu added a comment -

        It seems like the previous google groups thread is outdated - there are no root level loggers in sshj. In this patch I've changed log4j.xml for the CLI so that only error log messages will be displayed on the console. I've also changed in ComputeCache the log level from a message from info to debug (created new ComputeServiceContext ...)

        Show
        Andrei Savu added a comment - It seems like the previous google groups thread is outdated - there are no root level loggers in sshj. In this patch I've changed log4j.xml for the CLI so that only error log messages will be displayed on the console. I've also changed in ComputeCache the log level from a message from info to debug (created new ComputeServiceContext ...)
        Hide
        Andrei Savu added a comment -

        I've found a page explaining the problem: http://bit.ly/n0VMdd (Google Cache). It seems like some loggers used by SSHJ are root level loggers. I would look into how to change the logging settings to filter all these messages.

        Show
        Andrei Savu added a comment - I've found a page explaining the problem: http://bit.ly/n0VMdd (Google Cache). It seems like some loggers used by SSHJ are root level loggers. I would look into how to change the logging settings to filter all these messages.

          People

          • Assignee:
            Andrei Savu
            Reporter:
            Andrei Savu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development