I have put log4j to my buildpath, but I get the following message when I run my application:
log4j:WARN No appenders could be found for logger (dao.hsqlmanag
First of all: Create a log4j.properties file
# Root logger option
log4j.rootLogger=INFO, stdout
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
Place it in src/main/resources/
After that, use this 2 dependencies:
org.slf4j
slf4j-api
1.7.5
org.slf4j
slf4j-log4j12
1.7.5
It is necessary to add this final dependency to POM file:
org.springframework
spring-context
5.1.5.RELEASE