Skip to content

Commit 80933a1

Browse files
committed
Use java.util.logging for logging instead of println
1 parent c203372 commit 80933a1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>clojure</artifactId>
66
<name>clojure</name>
77
<packaging>jar</packaging>
8-
<version>1.12.2-1</version>
8+
<version>1.12.3-1</version>
99
<url>http://clojure.org/</url>
1010
<description>Clojure core environment and runtime library.</description>
1111

src/clj/clojure/main.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,7 @@ by default when a new command-line REPL is started."} repl-requires
525525
present"
526526
[[_ & args] inits]
527527
(when-not (some #(= eval-opt (init-dispatch (first %))) inits)
528-
(println "ClojureStorm" (clojure-version))
529-
(println "\nEvaluate the :help keyword for more info or :tut/basics for a beginners tour.\n"))
528+
(println "ClojureStorm" (clojure-version)))
530529
(repl :init (fn []
531530
(initialize args inits)
532531
(apply require repl-requires)))

src/jvm/clojure/storm/Emitter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.util.stream.Collectors;
77
import java.util.regex.Matcher;
88
import java.util.regex.Pattern;
9+
import java.util.logging.Logger;
910

1011
import clojure.asm.Opcodes;
1112
import clojure.asm.Type;
@@ -32,6 +33,8 @@
3233

3334
public class Emitter {
3435

36+
private static Logger logger = Logger.getLogger("clojure.storm");
37+
3538
final static Type TRACER_CLASS_TYPE = Type.getType(Tracer.class);
3639
final static Type OBJECT_CLASS_TYPE = Type.getType(Object.class);
3740
final static Type INT_TYPE = Type.getType(int.class);
@@ -70,7 +73,7 @@ public class Emitter {
7073
// This is kind of hacky because ClojureStorm shouldn't have anything related to
7174
// flow-storm, but we want to be sure that we never automatically instrument flow-storm root
7275
if(!autoPrefix.equals("flow-storm") && !autoPrefix.equals("clojure")) {
73-
System.out.println("ClojureStorm adding instrumentation auto prefix " + autoPrefix);
76+
logger.info("ClojureStorm adding instrumentation auto prefix " + autoPrefix);
7477
addInstrumentationOnlyPrefix(autoPrefix);
7578
}
7679

@@ -99,7 +102,7 @@ public Object invoke(Object prev) {
99102
}
100103
};
101104
INSTRUMENTATION_ENABLE.alterRoot(f ,null);
102-
System.out.println("Storm instrumentation set to: " + INSTRUMENTATION_ENABLE.deref());
105+
logger.info("Storm instrumentation set to: " + INSTRUMENTATION_ENABLE.deref());
103106
}
104107

105108
public static Boolean getInstrumentationEnable() {

0 commit comments

Comments
 (0)