I have declared Logger in my class, but I cann't see its output when I run my code on Tomcat - Eclipse.
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class TestClassDao implements TestDao{
protected final Log logger = LogFactory.getLog(getClass());
public void deleteData(){
//Do Operation
logger.info("Deleted rows affected: " + result);
}
Maven:
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
When I run the code on Eclipse Kelper using Tomcat Server 7, I am not able to see any output of the logger function.
Can you please suggest what I am missing here?
On starting tomcat check the console messages logged by log4j
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.