forked from DNAProject/DNA-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintHelper.java
More file actions
35 lines (30 loc) · 737 Bytes
/
Copy pathPrintHelper.java
File metadata and controls
35 lines (30 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package DNA.sdk.dbpool;
import java.text.SimpleDateFormat;
import java.util.Date;
class PrintHelper {
static String sdf = "yyyy-MM-dd HH:mm:ss.SSS";
static void printErrorConsole(String str) {
print(str, false);
}
static void printDebugConsole(String str) {
print(str, true);
}
static void print(String str, boolean isDebug) {
if(isDebug)
System.out.println(getNow() + str);
else
System.err.println(getNow() + str);
}
static void print() {
System.out.println();
}
static String getNow() {
return new SimpleDateFormat(sdf).format(new Date()) + " ";
}
public static void printError(String str) {
printErrorConsole(str);
}
public static void printDebug(String str) {
printDebugConsole(str);
}
}