I’m quite busy today. I originally wanted to write more content, but I have no choice for the time being. I’ll pick up a relatively simple component and write it down. The next few chapters will introduce components.
The use of LtLogger is relatively simple. The basic code is run in the Autoloader environment, so I am too lazy to reference the Shenma path and call the Shenma class library. I just know how to use it.
$log=new LtLogger();
//Define the log storage path yourself
$log->conf('log_file' => '/log/system.log');
$log->log(date('Y-m-d').' Add the current program name, and the operator will have a log');
It’s quite simple. If the file itself does not exist, it will be created directly in the specified path. If the file exists, it will be appended to the log. By default, each log will be separated by "t".