What is the significance of log4j.rootLogger property in log4j.properties file? What happens if i don't use this property?
问题 What is the significance of log4j.rootLogger property in log4j.properties file? What happens if I don't use this property? Example : # Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=DEBUG, A1 # A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender What happens if I set this property to ERROR mode. 回答1: Samudra Gupta explains in his book 1 : The Logger object is the main object that an application developer uses to log any message.