What is the significance of log4j.rootLogger property in log4j.properties file? What happens if i don't use this property?

后端 未结 3 1055
难免孤独
难免孤独 2020-12-04 12:58

What is the significance of log4j.rootLogger property in log4j.properties file? What happens if I don\'t use this property?

Example

3条回答
  •  时光取名叫无心
    2020-12-04 13:49

    log4j.rootLogger property sets the Level (DEBUG here) and Appender (A1 here) for root Logger. This is not mandatory. Root logger does not have a default appender attached and it can exist without an appender. So, your log4j properties file can be without this property being set.

    Root logger is the highest logger in the log4j hierarchy similar to Object class in Java.

提交回复
热议问题