I use hive jdbc in a java maven project and have the same issues.
My method is to add a log4j2.xml file under src/main/java/resources
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MyClassName {
private static final Logger LOG = LoggerFactory.getLogger(MyClassName.class);
}
log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="<your_package_name>.<your_class_name>" level="debug">
<AppenderRef ref="Console"/>
</Logger>
<Root level="WARN">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>