11월, 2019의 게시물 표시

c++ Log file - colorful, daily rotating

이미지
You need to keep track of the events or activities that occur during the execution of the program you are developing now. You create a log file for this purpose. Log files are also necessary for debugging during development. Log files that serve this purpose must contain the following entry: Logging time : The time when the log is written. It can be expressed in mili second units. However, if the log frequency is low, the log in seconds may be OK. Log Level : It represents the importance of the log and is generally divided into debug, info, notice, .. error, and so on. Log contents : What you want to record. It is good to be compact and to express the contents clearly. Time recording For server programs, tens to hundreds of logs can be generated per second. Therefore, whenever possible, log time should be logged in milliseconds rather than seconds. Logging in microseconds is possible, but on some systems these values ​​are meaningless. In this article, I'll cover creating...