Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-460

Verbose logging does not turn the level for correct logger

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1-incubating
    • Fix Version/s: 1.4.2
    • Component/s: None
    • Labels:
    1. sqoop.patch
      0.8 kB
      Marcin Cylke
    2. SQOOP-460.patch
      3 kB
      Jarek Jarcec Cecho

      Activity

      Hide
      marcin_cylke Marcin Cylke added a comment - - edited

      Log category for verbose mode not correctly set up.

      Index: src/java/org/apache/sqoop/tool/BaseSqoopTool.java
      ===================================================================
      --- src/java/org/apache/sqoop/tool/BaseSqoopTool.java	(revision 1298799)
      +++ src/java/org/apache/sqoop/tool/BaseSqoopTool.java	(working copy)
      @@ -631,9 +631,10 @@
           // common options.
           if (in.hasOption(VERBOSE_ARG)) {
             // Immediately switch into DEBUG logging.
      -      Category sqoopLogger = Logger.getLogger(
      -          Sqoop.class.getName()).getParent();
      +      Category sqoopLogger = Logger.getLogger("com.cloudera.sqoop");
             sqoopLogger.setLevel(Level.DEBUG);
      +      Category sqoopLogger2 = Logger.getLogger("org.apache.sqoop");
      +      sqoopLogger2.setLevel(Level.DEBUG);
             LOG.debug("Enabled debug logging.");
           }
       
      
      Show
      marcin_cylke Marcin Cylke added a comment - - edited Log category for verbose mode not correctly set up. Index: src/java/org/apache/sqoop/tool/BaseSqoopTool.java =================================================================== --- src/java/org/apache/sqoop/tool/BaseSqoopTool.java (revision 1298799) +++ src/java/org/apache/sqoop/tool/BaseSqoopTool.java (working copy) @@ -631,9 +631,10 @@ // common options. if (in.hasOption(VERBOSE_ARG)) { // Immediately switch into DEBUG logging. - Category sqoopLogger = Logger.getLogger( - Sqoop.class.getName()).getParent(); + Category sqoopLogger = Logger.getLogger( "com.cloudera.sqoop" ); sqoopLogger.setLevel(Level.DEBUG); + Category sqoopLogger2 = Logger.getLogger( "org.apache.sqoop" ); + sqoopLogger2.setLevel(Level.DEBUG); LOG.debug( "Enabled debug logging." ); }
      Hide
      marcin_cylke Marcin Cylke added a comment -

      Mind that it's quick and dirty and is rather intended as a heads-up - might require more general approach.

      Show
      marcin_cylke Marcin Cylke added a comment - Mind that it's quick and dirty and is rather intended as a heads-up - might require more general approach.
      Hide
      aprabhakar Arvind Prabhakar added a comment -

      @Marcin - thanks for the patch. In order for this change to be complete, we need to update the applyOptions() method for org.apache.sqoop.tool.JobTool and org.apache.sqoop.tool.MergeTool as well. If you can update the patch for that, that will be great.

      If you are short on time please respond to this and I will be glad to take up your patch and incorporate this on top.

      Show
      aprabhakar Arvind Prabhakar added a comment - @Marcin - thanks for the patch. In order for this change to be complete, we need to update the applyOptions() method for org.apache.sqoop.tool.JobTool and org.apache.sqoop.tool.MergeTool as well. If you can update the patch for that, that will be great. If you are short on time please respond to this and I will be glad to take up your patch and incorporate this on top.
      Hide
      cheolsoo Cheolsoo Park added a comment -

      The same fix is committed at SQOOP-488; therefore, I am closing this jira.

      Show
      cheolsoo Cheolsoo Park added a comment - The same fix is committed at SQOOP-488 ; therefore, I am closing this jira.
      Hide
      jarcec Jarek Jarcec Cecho added a comment -

      Hi Chelsoo,
      thank you very much for updating this issue - I've completely missed it when I was creating and fixing SQOOP-488. I'm afraid that Arvind's note is still valid as I did not fixed other occurrences. I'm reopening this issue and attaching new patch.

      Jarcec

      Show
      jarcec Jarek Jarcec Cecho added a comment - Hi Chelsoo, thank you very much for updating this issue - I've completely missed it when I was creating and fixing SQOOP-488 . I'm afraid that Arvind's note is still valid as I did not fixed other occurrences. I'm reopening this issue and attaching new patch. Jarcec
      Hide
      cheolsoo Cheolsoo Park added a comment -

      Hi Jarcec, thank you for catching that! I should have read comments more carefully.

      Show
      cheolsoo Cheolsoo Park added a comment - Hi Jarcec, thank you for catching that! I should have read comments more carefully.
      Hide
      bleeapache Bilung Lee added a comment -

      Thanks, Jarcec. Patch is committed.

      Show
      bleeapache Bilung Lee added a comment - Thanks, Jarcec. Patch is committed.
      Hide
      hudson Hudson added a comment -

      Integrated in Sqoop-ant-jdk-1.6 #124 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6/124/)
      SQOOP-460 Verbose logging does not turn the level for correct logger (Revision 1353677)

      Result = SUCCESS
      blee :
      Files :

      • /sqoop/trunk/src/java/org/apache/sqoop/tool/JobTool.java
      • /sqoop/trunk/src/java/org/apache/sqoop/tool/MergeTool.java
      Show
      hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6 #124 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6/124/ ) SQOOP-460 Verbose logging does not turn the level for correct logger (Revision 1353677) Result = SUCCESS blee : Files : /sqoop/trunk/src/java/org/apache/sqoop/tool/JobTool.java /sqoop/trunk/src/java/org/apache/sqoop/tool/MergeTool.java

        People

        • Assignee:
          jarcec Jarek Jarcec Cecho
          Reporter:
          aprabhakar Arvind Prabhakar
        • Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development