I think there is some classpath magic you can do to have log4j find a log4j.properties or log4j.xml, but I don't rely on that.. I run in JBoss, and the babeldoc logging uses the JBoss log environment. If you are running babeldoc in a standalone JVM, you can use a parameter to the JVM, like:
-Dlog4j.configuration=/log4j.xml
Sherman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have written several pipeline stages and I would like to enable logging. I thought that something like the following would do the trick:
import com.babeldoc.core.LogService;
LogService.getInstance().logInfo("File Archived");
I thought that maybe the info line would show up in the journal.log file, but it doesn't.
Has anyone done any custom logging?
Thanks,
Bob
The LogService uses apache.commons.logging.
Try configuring as per log4j.
Sherman
Where would I put the configuration file?
Thanks,
Bob
I think there is some classpath magic you can do to have log4j find a log4j.properties or log4j.xml, but I don't rely on that.. I run in JBoss, and the babeldoc logging uses the JBoss log environment. If you are running babeldoc in a standalone JVM, you can use a parameter to the JVM, like:
-Dlog4j.configuration=/log4j.xml
Sherman
Thanks Sherman. I found the default log4j.properties file. It's in \modules\core\config. I added a FileAppender to it. It's working fine.