diff --git a/java-src/io/github/erdos/stencil/impl/Logging.java b/java-src/io/github/erdos/stencil/impl/Logging.java deleted file mode 100644 index 9bbf0966..00000000 --- a/java-src/io/github/erdos/stencil/impl/Logging.java +++ /dev/null @@ -1,32 +0,0 @@ -package io.github.erdos.stencil.impl; - -import org.slf4j.Logger; - -import java.util.concurrent.atomic.AtomicLong; -import java.util.function.Consumer; -import java.util.function.Supplier; - -/** - * Logging support - */ -@SuppressWarnings("WeakerAccess") -public final class Logging { - - private Logging() {} - - /** - * Returns a consumer that can be used to print elapsed time. - */ - public static Consumer> debugStopWatch(Logger logger) { - AtomicLong lastMeasure = new AtomicLong(0); - return msg -> { - long now = System.currentTimeMillis(); - long previous = lastMeasure.getAndSet(now); - - if (previous == 0) { - logger.debug(msg.get()); - } else - logger.debug(msg.get(), now - previous); - }; - } -} diff --git a/java-src/io/github/erdos/stencil/impl/NativeEvaluator.java b/java-src/io/github/erdos/stencil/impl/NativeEvaluator.java index 9cae6606..e0fb69dc 100644 --- a/java-src/io/github/erdos/stencil/impl/NativeEvaluator.java +++ b/java-src/io/github/erdos/stencil/impl/NativeEvaluator.java @@ -15,10 +15,8 @@ import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; -import java.util.function.Supplier; import java.util.stream.Collectors; -import static io.github.erdos.stencil.impl.Logging.debugStopWatch; import static java.util.Collections.emptyList; /** @@ -46,9 +44,6 @@ public EvaluatedDocument render(PreparedTemplate template, Map> stopwatch = debugStopWatch(LOGGER); - stopwatch.accept(() -> "Starting document rendering for template " + template.getTemplateFile()); - final IFn fn = ClojureHelper.findFunction("eval-template"); final Object argsMap = makeArgsMap(template.getSecretObject(), fragments, data.getData()); diff --git a/project.clj b/project.clj index 18fe379c..d6707a20 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject io.github.erdos/stencil-core "0.5.7" +(defproject io.github.erdos/stencil-core "0.5.8-SNAPSHOT" :url "https://github.com/erdos/stencil" :description "Templating engine for office documents." :license {:name "Eclipse Public License - v 2.0" diff --git a/service/project.clj b/service/project.clj index 0a59aec6..cd325fb2 100644 --- a/service/project.clj +++ b/service/project.clj @@ -1,10 +1,10 @@ -(defproject io.github.erdos/stencil-service "0.5.7" +(defproject io.github.erdos/stencil-service "0.5.8-SNAPSHOT" :description "Web service for the Stencil templating engine" :url "https://github.com/erdos/stencil" :license {:name "Eclipse Public License - v 2.0" :url "https://www.eclipse.org/legal/epl-2.0/"} :dependencies [[org.clojure/clojure "1.11.1"] - [io.github.erdos/stencil-core "0.5.7"] + [io.github.erdos/stencil-core "0.5.8-SNAPSHOT"] [org.slf4j/slf4j-api "2.0.0-alpha7"] [org.mozilla/rhino-engine "1.7.14"] [http-kit "2.5.0"]