How to customize sync tool logging?

11 views
Skip to first unread message

David Chandek-Stark

unread,
Jan 18, 2017, 11:56:12 AM1/18/17
to DuraCloud Users
Hi,

I want to customize the logging configuration for the sync tool, specifically to keep more than 5 past files, which seems to be how v4.2.0 is configured.

Can I do this with a command line option?

Thanks,
David

Bill Branan

unread,
Jan 18, 2017, 12:30:33 PM1/18/17
to David Chandek-Stark, DuraCloud Users
Hi David,

Yes, you should be able to do this on the command line. The SyncTool uses logback for logging. According to their documentation (http://logback.qos.ch/manual/configuration.html):

You may specify the location of the default configuration file with a system property named "logback.configurationFile". The value of this property can be a URL, a resource on the class path or a path to a file external to the application.
 
java -Dlogback.configurationFile=/path/to/config.xml chapters.configuration.MyApp1
 
Note that the file extension must be ".xml" or ".groovy". Other extensions are ignored.

You can create your own logback.xml file by copying the one included in the SyncTool: https://github.com/duracloud/duracloud/blob/master/synctoolui/src/main/resources/logback.xml. You'd then change the rolling policy to work as you would prefer.

Hope this helps,
Bill

--
You received this message because you are subscribed to the Google Groups "DuraCloud Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to duracloud-users+unsubscribe@googlegroups.com.
To post to this group, send email to duracloud-users@googlegroups.com.
Visit this group at https://groups.google.com/group/duracloud-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages