-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
42 lines (35 loc) · 1.26 KB
/
Copy pathMain.java
File metadata and controls
42 lines (35 loc) · 1.26 KB
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
36
37
38
39
40
41
42
import com.sakthivel.micrologger.Log;
import com.sakthivel.micrologger.LogConfig;
public class Main {
public static void main(String[] args) {
LogConfig config = new LogConfig()
.setPrintToConsole(true)
.setLogDirectory("log")
.setRotateDaily(true)
.setColorEnabled(true);
Log.init(config);
Log logger = Log.getInstance();
logger.setUid("Hello");
logger.statement("Main(+)");
logger.error("Occured");
logger.setReference("Sakthivel is Logging");
System.out.println("Hello World");
logger.info("Programm Started...");
logger.details("Programm Endded");
logger.statement("Main(-)");
System.out.println("Hello World");
caller(logger);
}
public static void caller(Log logger) {
logger.error("error in caller method");
logger.debug("Debugging..");
logger.setReference("Ram is Logging");
logger.setUid("Helo World");
System.out.println("Hello World");
logger = Log.getInstance();
logger.removeReference();
logger.error("222.error in caller method");
System.out.println("Hello World");
logger.debug("3333.Debugging..");
}
}