Skip to content

Commit cfa2878

Browse files
committed
Add println and printf to LogTracer
1 parent 7e2cc20 commit cfa2878

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = 'org.algorithm_visualizer'
7-
version = '2.1.0'
7+
version = '2.2.0'
88
sourceCompatibility = 1.8
99

1010
repositories {

src/main/java/org/algorithm_visualizer/LogTracer.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,17 @@ public LogTracer print(Object message) {
3333
addTrace(key, "print", new Object[]{message});
3434
return this;
3535
}
36+
37+
public LogTracer println(Object message) {
38+
addTrace(key, "println", new Object[]{message});
39+
return this;
40+
}
41+
42+
public LogTracer printf(String format, Object... args) {
43+
Object[] traceArgs = new Object[args.length + 1];
44+
traceArgs[0] = format;
45+
System.arraycopy(args, 0, traceArgs, 1, args.length);
46+
addTrace(key, "printf", traceArgs);
47+
return this;
48+
}
3649
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy