NIHVIVO-1025 (consider leaving log files untouched if no upgrade is necessary)
This commit is contained in:
parent
709b1fc534
commit
054cb16d17
1 changed files with 5 additions and 1 deletions
|
@ -44,7 +44,7 @@ public class OntologyUpdater {
|
|||
|
||||
public OntologyUpdater(OntologyUpdateSettings settings) {
|
||||
this.settings = settings;
|
||||
this.logger = new SimpleOntologyChangeLogger(settings.getLogFile(), settings.getErrorLogFile());
|
||||
this.logger = null;
|
||||
this.record = new SimpleOntologyChangeRecord(settings.getAddedDataFile(), settings.getRemovedDataFile());
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,10 @@ public class OntologyUpdater {
|
|||
boolean updateRequired = updateRequired();
|
||||
if (updateRequired) {
|
||||
|
||||
if (this.logger == null) {
|
||||
this.logger = new SimpleOntologyChangeLogger(settings.getLogFile(), settings.getErrorLogFile());
|
||||
}
|
||||
|
||||
try {
|
||||
performUpdate();
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue