private static String initHiveLog4jDefault(Configuration conf, String logMessage, ConfVars confVarName) throws LogInitializationException { URL hive_l4j = null; switch (confVarName) { case LOG4J_FILE: hive_l4j = LogUtils.class.getClassLoader().getResource(HIVE_L4J); break; default: break; } if (hive_l4j != null) { final boolean async = checkAndSetAsyncLogging(conf); System.setProperty(DefaultThreadContextMap.INHERITABLE_MAP, "true"); Configurator.initialize(null, hive_l4j.toString()); logConfigLocation(); return (logMessage + "\n" + "Logging initialized using configuration in " + hive_l4j + " Async: " + async); } else { throw new LogInitializationException( logMessage + "Unable to initialize logging using " + LogUtils.HIVE_L4J + ", not found on CLASSPATH!"); } }
HMSHandler.LOG.warn(e.getMessage());
HMSHandler.LOG.warn(e.getMessage());
private static String initHiveLog4jDefault(Configuration conf, String logMessage, ConfVars confVarName) throws LogInitializationException { URL hive_l4j = null; switch (confVarName) { case LOG4J_FILE: hive_l4j = LogUtils.class.getClassLoader().getResource(HIVE_L4J); break; default: break; } if (hive_l4j != null) { final boolean async = checkAndSetAsyncLogging(conf); System.setProperty(DefaultThreadContextMap.INHERITABLE_MAP, "true"); Configurator.initialize(null, hive_l4j.toString()); logConfigLocation(); return (logMessage + "\n" + "Logging initialized using configuration in " + hive_l4j + " Async: " + async); } else { throw new LogInitializationException( logMessage + "Unable to initialize logging using " + LogUtils.HIVE_L4J + ", not found on CLASSPATH!"); } }