The official docs says you can do this:
FileLogHandlerConfiguration fileHandler = LoggerConfiguration.fileLogHandler(this);
fileHandler.setFullFilePathPattern(SOMEPATH);
LoggerConfiguration.configuration().addHandlerToRootLogger(fileHandler);
and the log file would be located into SOMEPATH. I would recommend you use a regular environment directory instead of an arbitrary string, like
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).getPath()+File.pathSeparator+"appLogs"
Now, if you want to copy some existing logs to an outher destination, you can just copy the files.
if(BuildConfig.DEBUG) {
File logs = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).getPath(), "logs");
FileLogHandlerConfiguration fileHandler = LoggerConfiguration.fileLogHandler(this);
LoggerConfiguration.configuration().addHandlerToRootLogger(fileHandler);
File currentLogs = fileHandler.getCurrentFileName();
if (currentLogs.exists()) {
FileChannel src = new FileInputStream(currentLogs).getChannel();
FileChannel dst = new FileOutputStream(logs).getChannel();
dst.transferFrom(src, 0, src.size());
src.close();
dst.close();
}
}
Finally, keep in mind nothing will work if you don't get the proper storage permissions!
Hope it helps. Happy coding!