log4j logging twice

前端 未结 9 1771
眼角桃花
眼角桃花 2021-02-04 23:02

I am using log4j to log error and other system information. but come of the info logged twice at INFO level.

public static void main(final String... args) throws         


        
9条回答
  •  遇见更好的自我
    2021-02-04 23:53

    Agree with atlantis.

    log4j.rootCategory=INFO, console
    log4j.logger.org.hibernate=INFO
    

    The above property settings will cause double logging.

    However adding

    log4j.additivity.org.hibernate=false
    

    fixed the issue.

    Check out page 62 of this book. http://books.google.com/books?id=hZBimlxiyAcC&printsec=frontcover#v=onepage&q&f=false

提交回复
热议问题