I need to create application logs to capture users signing in/out and their requests, for that.
We’re using Java EE, and thought that creating new log files (new txt file for each day) would be a good approach, but I see that people discourage doing that, the question is: why not do it that way, and what is the correct approach?
also – is there some way to get the application directory?
log4j is one of the popularly used logger for Java EE applications and the others are slf4j,logback
log4jhas many features, one them being able to create daily log files.and to answer your question,
creating daily log files does not cause any harm to your application.