Reputation: 21
I have following statements imported in my project:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
and following being written in my class:
private static Log logger = LogFactory.getLog(ClassName.class);
logger.info("BEGIN query");
logger.severe("data is required");
I am running my project in Eclipse, without using server.
Could anyone help me to find out the location where these logs will be written while running the program ?
Upvotes: 1
Views: 378
Reputation: 7457
Suppose you have this sample package structure:
And add TestLog class's Edit Configuration under VM arguments likes this:
-Djava.util.logging.config.file=/D:/dev/workspace/LoggingTest/bin/log-config.properties(your properties file path)
And run then you can find your log file under D:/temp/log/test.log
Upvotes: 2