COOL-cohort / COOL

the source code of the COOL system
https://www.comp.nus.edu.sg/~dbsystem/cool/
Apache License 2.0
45 stars 16 forks source link

Add Log Part. #43

Closed Zrealshadow closed 2 years ago

Zrealshadow commented 2 years ago

I choose logback to implement the interface of slf4j.

Other modification

Zrealshadow commented 2 years ago

For the commit log, I forget to merge first and create branch later. I think if we merge, the duplicated commit log will be deleted. Right ?

Zrealshadow commented 2 years ago

Are we going to use it to replace all the System.out.println for other internal logging?

Also, if we get it for internal logging, we shall test the added dependency compatibility with those introduced by Naili,

Let's merge this after Naili's distributed PR.

Actually, the mechanism of java log pattern is that we have to create a logger instance as a attribute in every class if you want to trace the log. In my opinion, it will cost a lot if we add this mechanism in cool-core part. Obviously for a system which emphasizes efficiency, it is not a good idea.

If we must add log in cool-core part to moniter the process of this system, I have a proposal. We create a singleton class, in which we staticaly initialize a log pattern. Whenever we have to get record in cool-core, we call this static singleton class. The shortcut of this is that we can not trace the log accurately, but it will save much memory usage considering the lots of class.