How to make general Apache log in a specific disk log file
2 answers
Commons logging is basically a wrapper around Java logging (java.util.logging) or log4j libraries. You will need to configure whatever base library you are using.
In your example, if I was using log4j (and I usually prefer it in the Java logging system), I would use something like:
log4j.logger.com.mypackage.Myclass = ERROR, FILEA
To specify a file to output to.
It would be helpful to read the introduction to log4j if you haven't already.
+1
user7094
a source
to share
Define appenders in your config file. For a Log4J sample take a look at http://www.java2s.com/Code/Java/Language-Basics/Examplelog4jConfigurationFile.htm
For registration in Java, see http://www.oracle.com/technology/pub/articles/hunter_logging.html
+1
a source to share