Index: cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java =================================================================== --- cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java (revision 1091220) +++ cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java (working copy) @@ -441,6 +441,7 @@ if (!oproc.process_stage2(ss)) { System.exit(2); } + ss.printInitInfo(); // set all properties specified via command line HiveConf conf = ss.getConf(); Index: ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (revision 1091220) +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (working copy) @@ -284,15 +284,23 @@ public static void initHiveLog4j() { // allow hive log4j to override any normal initialized one URL hive_l4j = SessionState.class.getClassLoader().getResource(HIVE_L4J); - if (hive_l4j == null) { - System.out.println("Unable to initialize logging. " + HIVE_L4J + " not found on CLASSPATH!"); - } else { + if (hive_l4j != null) { LogManager.resetConfiguration(); PropertyConfigurator.configure(hive_l4j); - SessionState.getConsole().printInfo("Logging initialized using configuration in " + hive_l4j); } } + public void printInitInfo() { + URL hive_l4j = SessionState.class.getClassLoader().getResource(HIVE_L4J); + if (!isSilent) { + if (hive_l4j == null) { + System.err.println("Unable to initialize logging. " + HIVE_L4J + " not found on CLASSPATH!"); + } else { + SessionState.getConsole().printInfo("Logging initialized using configuration in " + hive_l4j); + } + } + } + /** * This class provides helper routines to emit informational and error * messages to the user and log4j files while obeying the current session's