LotusPhp notes: how to use the Logger component. Today, I was very busy. I wanted to write more content. there is no way to do it now. I have to pick up a simple component and write it down. I will introduce the components in the following chapters. The use of LtLogger is still relatively simple.
Today, I was very busy. I wanted to write more content. there is no way to do it now. I have to pick up a simple component and write it down. I will introduce the components in the following chapters.
The use of LtLogger is relatively simple. the basic code is run in the Autoloader environment, so I am also lazy to reference the Shenma path and call the Shenma class library to know how to use it.
$ Log = new LtLogger ();
// Customize the log storage path
$ Log-> conf ('log _ file' => '/log/system. log ');
$ Log-> log (date ('Y-m-D'). 'with the current program name added, the operator is a log ');
It is quite simple. if the file does not exist, it will be directly created in the specified path. if the file exists, it will be appended to the log, by default, each log is separated by \ t.
Bytes. The use of LtLogger is still relatively simple...