LotusPhp notes: how to use the Logger component-PHP Tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.