LotusPhp笔记之:Logger组件的使用方法
Jun 13, 2016 am 11:52 AM
今天比较忙,本来想写多点内容,暂时没有办法了,捡个比较简单的组件来写下好了,往后的几章都是介绍组件。
LtLogger的使用还是比较简单的,基本代码都是在Autoloader的环境下运行的,所以我也懒的去引用神马路径,调用神马类库,知道怎么用就可以了。
$log=new LtLogger();
//自己定义log的存放路径
$log->conf('log_file' => '/log/system.log');
$log->log(date('Y-m-d').' 加上当前程序名,操作人就是一条日志了');
挺简单的吧,如果文件本身不存在,会直接创建在指定的路径里,文件存在的话,会追加到日志里,默认每条日志以"\t"来进行分割。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to enable nfc function on Xiaomi Mi 14 Pro?

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?

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?

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
