Skip to content

Commit

Permalink
#38 Changing the logging to info
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrudin committed Nov 23, 2016
1 parent da4dd19 commit cdfe441
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=com.marklogic
javadocsDir=../gh-pages-marklogic-java/javadocs
version=2.11.0
version=2.11.0-dev
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ public void checkLoadedAssets(List<LoadedAsset> assets) {
*/
protected void staticallyCheckModule(String uri) {
try {
if (logger.isDebugEnabled()) {
logger.debug("Performing static check on module at URI: " + uri);
if (logger.isInfoEnabled()) {
logger.info("Performing static check on module at URI: " + uri);
}
String xquery = "let $uri := '" + uri + "' return " + buildXqueryForStaticallyCheckingModule();
executeQuery(xquery);
if (logger.isInfoEnabled()) {
logger.info("Finished static check on module at URI: " + uri);
}
} catch (Exception re) {
String message = "Static check failed for module at URI: " + uri + "; cause: " + re.getMessage();
throw new RuntimeException(message, re);
Expand All @@ -61,12 +64,12 @@ protected void performBulkStaticCheck(List<LoadedAsset> assets) {
xquery += ") for $uri in $uris return " + buildXqueryForStaticallyCheckingModule();

try {
if (logger.isDebugEnabled()) {
logger.debug("Static checking all loaded modules");
if (logger.isInfoEnabled()) {
logger.info("Static checking all loaded modules");
}
executeQuery(xquery);
if (logger.isDebugEnabled()) {
logger.debug("Finished static checking all loaded modules");
if (logger.isInfoEnabled()) {
logger.info("Finished static checking all loaded modules");
}
} catch (Exception re) {
String message = "Bulk static check failure, cause: " + re.getMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,4 +553,8 @@ public void setRestApiAssetLoader(RestApiAssetLoader restApiAssetLoader) {
public void setStaticChecker(StaticChecker staticChecker) {
this.staticChecker = staticChecker;
}

public StaticChecker getStaticChecker() {
return staticChecker;
}
}

0 comments on commit cdfe441

Please sign in to comment.