log4j.logger.com.demo.package=INFO, MyClass
log4j.additivity.com.demo.package=false
log4j.appender.MyClass=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MyClass.File=logs/mylog.log
Logger.getLogger(“com.demo.package”).info(“123”)
log4j.logger.com.demo.package=INFO, MyClass
log4j.additivity.com.demo.package=false
log4j.appender.MyClass=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MyClass.File=logs/mylog.log
Logger.getLogger(“com.demo.package”).info(“123”)