LotusPhp Notes: How to use the Logger component_PHP tutorial

WBOY
Release: 2016-07-21 15:10:56
Original
963 people have browsed it

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".

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327025.htmlTechArticleI am quite busy today. I originally wanted to write more content, but I have no choice for the time being. I will pick a simpler component to write. Once downloaded, the next few chapters will introduce components. The use of LtLogger is relatively simple...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!