fix debug logging for snapshot generation

This commit is contained in:
Grahame Grieve 2023-01-17 05:36:44 +11:00
parent 2a0d8a236f
commit 41abbb21a0
4 changed files with 9 additions and 3 deletions

View File

@ -2275,6 +2275,9 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
}
} catch (Exception e) {
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
if (logger.isDebugLogging()) {
e.printStackTrace();
}
}
}
System.out.print(":");

View File

@ -207,7 +207,7 @@ public class ContextUtilities implements ProfileKnowledgeProvider {
} catch (Exception e) {
if (!isSuppressDebugMessages()) {
System.out.println("Unable to generate snapshot for "+tail(sd.getUrl()) +" from "+tail(sd.getBaseDefinition())+" because "+e.getMessage());
if (true) {
if (context.getLogger().isDebugLogging()) {
e.printStackTrace();
}
}

View File

@ -660,6 +660,9 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
} catch (Exception e) {
// not sure what to do in this case?
System.out.println("Unable to generate snapshot for "+uri+": "+e.getMessage());
if (logger.isDebugLogging()) {
e.printStackTrace();
}
}
}
return r;

View File

@ -764,9 +764,9 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP
makeSnapshot(sd);
} catch (Exception e) {
System.out.println("Process Note: Unable to generate snapshot for " + sd.present() + ": " + e.getMessage());
// if (debug) {
if (context.getLogger().isDebugLogging()) {
e.printStackTrace();
// }
}
}
}
}