If you experience problems that you think are JavaSVN related, it is always a good idea to post a bug report into JavaSVN Issue Tracker. To provide more information with the bug report, please consider attaching JavaSVN log file to it. Below you will find detailed instructions on how to get JavaSVN log file.
When used within Eclipse JavaSVN logs its operation using Eclipse built-in logging facilities. Logging is turned off by default. To enable JavaSVN logging please do the following:
$eclipse -debug
By default JavaSVN uses standard JDK logging API. You may find JavaSVN log file at USER_HOME/.javasvn/.javasvn.0.0.log
Following system properties may be used to control JavaSVN logging output:
javasvn.log.console=true|false [false]
- log to System.out
javasvn.log.file=true|false [true]
- log to file
javasvn.log.path=path/to/log/file
- use specified log file instead of default one
javasvn.log.svn=true|false [false]
- log svn protocol messages
javasvn.log.http=true|false [false]
- log DAV protocol requests
When you're using JavaSVN in your application it is not always an option to let
JavaSVN use JDK logging API. Instead you may like to have a fine-grained control over
the way JavaSVN logs its operations. The solution is to provide JavaSVN with custom logger
class that should extend DebugLoggerAdapter
class. The code below demonstrates
how it could be done.
.... import org.tmatesoft.svn.util.DebugLog; import org.tmatesoft.svn.util.DebugLoggerAdapter; .... public static void initJavaSVNLogger() { DebugLog.setLogger(new CustomJavaSVNLogger(); } private static class CustomJavaSVNLogger extends DebugLoggerAdapter { // Override superclass methods to redirect logging // as you wish. Superclass implementaion is empty, i.e. // all log messages are swallowed. } ....
Note: One have to set up the custom logger before any other calls are made to JavaSVN, otherwise default logging will be used.
If you have any questions regarding JavaSVN, would like to report a bug or contribute a patch, please write to support@tmatesoft.com