Hi, Radim ~ Did you open the project from existing one or a fresh new ? The Calcite use log4j 1.17 but there seems some class path problems with your env.
Best, Danny Chan 在 2020年2月19日 +0800 AM4:28,Baca Radim <[email protected]>,写道: > Hi, > > I have downloaded the Calcite and opened its Gradle project in IntelliJ > IDEA 2019.3.2. I had a problem that it could not load the slf4j classes > correctly (I was getting the SLF4J: Failed to load class > "org.slf4j.impl.StaticLoggerBinder" error). Finally, I resolved the > problem by adding the following lines into build.gradle.kts of the :core > module: > > ------------------------------ > > /dependencies /*{* > > * ... * > > /implementation/(*"org.slf4j:slf4j-api:1.7.3"*) > > /implementation/(*"org.slf4j:slf4j-simple:1.7.3"*) > > ... > > } > > ------------------------------ > > Now get rid of the error; however, the logger is always set to INFO > logging level regardless of the core\src\test\resource\log4j.properties. > Currently, my log4j.properties looks as follows: > > ------------------------------ > > /# Change rootLogger level to WARN/ > > *log4j.rootLogger*=*ALL, A1* > > > /# A1 goes to the console/ > > *log4j.appender.A1*=*org.apache.log4j.ConsoleAppender* > > *log4j.appender.A1.layout*=*org.apache.log4j.PatternLayout* > > *log4j.appender.A1.layout.ConversionPattern*=*%d [%t] %-5p - %m%n* > > ------------------------------ > > I run the CsvExample tests without any logging. When I debug, I see that > the RelOptRuleCall.LOGGER is set to INFO logging level. The > RelOptRuleCall.LOGGER is an instance of org.slf4j.impl.SimpleLogger. I > was also following the > <https://calcite.apache.org/docs/howto.html#tracing> instructions but > without luck (the RelOptRuleCall.LOGGER is set to INFO despite any > log4j.properties changes). > > I'm using IntelliJ IDEA 2019.3.2 Community edition and Windows 10. I was > also trying JDK 1.8 instead of default JDK 11 but with the same result. > What am I doing wrong? Thanks, Radim >
