Home php教程 php手册 LotusPhp笔记之:Logger组件的使用方法

LotusPhp笔记之:Logger组件的使用方法

Jun 13, 2016 am 11:52 AM
Instructions content Method Compare of notes components

今天比较忙,本来想写多点内容,暂时没有办法了,捡个比较简单的组件来写下好了,往后的几章都是介绍组件。

LtLogger的使用还是比较简单的,基本代码都是在Autoloader的环境下运行的,所以我也懒的去引用神马路径,调用神马类库,知道怎么用就可以了。

$log=new LtLogger();

//自己定义log的存放路径
$log->conf('log_file' => '/log/system.log');

$log->log(date('Y-m-d').' 加上当前程序名,操作人就是一条日志了');

挺简单的吧,如果文件本身不存在,会直接创建在指定的路径里,文件存在的话,会追加到日志里,默认每条日志以"\t"来进行分割。

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to enable nfc function on Xiaomi Mi 14 Pro? How to enable nfc function on Xiaomi Mi 14 Pro? Mar 19, 2024 pm 02:28 PM

How to enable nfc function on Xiaomi Mi 14 Pro?

How to delete Xiaohongshu notes How to delete Xiaohongshu notes Mar 21, 2024 pm 08:12 PM

How to delete Xiaohongshu notes

How to use DirectX repair tool? Detailed usage of DirectX repair tool How to use DirectX repair tool? Detailed usage of DirectX repair tool Mar 15, 2024 am 08:31 AM

How to use DirectX repair tool? Detailed usage of DirectX repair tool

What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? Mar 21, 2024 pm 09:30 PM

What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found?

How to add product links in notes in Xiaohongshu Tutorial on adding product links in notes in Xiaohongshu How to add product links in notes in Xiaohongshu Tutorial on adding product links in notes in Xiaohongshu Mar 12, 2024 am 10:40 AM

How to add product links in notes in Xiaohongshu Tutorial on adding product links in notes in Xiaohongshu

How to use TikTok on Huawei Pocket2 remotely? How to use TikTok on Huawei Pocket2 remotely? Mar 18, 2024 pm 03:00 PM

How to use TikTok on Huawei Pocket2 remotely?

What is the KMS activation tool? How to use the KMS activation tool? How to use KMS activation tool? What is the KMS activation tool? How to use the KMS activation tool? How to use KMS activation tool? Mar 18, 2024 am 11:07 AM

What is the KMS activation tool? How to use the KMS activation tool? How to use KMS activation tool?

How to set line spacing in WPS Word to make the document neater How to set line spacing in WPS Word to make the document neater Mar 20, 2024 pm 04:30 PM

How to set line spacing in WPS Word to make the document neater

See all articles