当前位置:网站首页>ThinkPHP 5 log management
ThinkPHP 5 log management
2022-06-25 04:49:00 【Oglie's magic slippers~】
ThinkPHP 5 Log management
In the configuration file, such as /application/config.php
'log' => [
// Logging mode , built-in file socket Support extended
'type' => 'File',
// 'type' => 'test', // Close the log , If it is this configuration ,Log::write() Such methods are useless
// Log save directory
'path' => LOG_PATH,
// Logging level
'level' => [],// ['log', 'error', 'info', 'sql', 'notice', 'alert', 'debug'];// To be specific, see /thinkphp/library/think/Log.php Configuration of
'apart_level' => ['sql'],// Configure a separate file , Normally we suggest that sql Statement in a separate file
'max_files'=>100,// Maximum number of saved logs , exceed tp Will clean up automatically
'close'=>false,// Whether to turn off log writing
'json'=>true,//json Format log on
],
| record() | Logging to memory |
| save() | Save the log information stored in memory ( Use the specified recording method ) write in , And clear the log in memory |
| write() | Write a log message in real time , Will trigger save operation |
Because the system will automatically call after the request Log::save Method , So usually , You just call Log::record Just record the log information .
Generate log path :\runtime\log
边栏推荐
猜你喜欢

At the age of 30, I began to learn programming by myself. Is it still time for me to have difficulties at home?

Efficient NoSQL database service Amazon dynamodb experience sharing

Record the problem of C # print size once

我的IC之旅——资深芯片设计验证工程师成长——“胡”说IC工程师完美进阶
![[esp32 learning path 6 - Flash encryption]](/img/4c/f317ca4823dca50a9bccd285967ab0.png)
[esp32 learning path 6 - Flash encryption]

【FLink】access closed classloader classloader. check-leaked-classloader

Vscode 设置clang-format

Cnpm: unable to load file c:\users\administrator\appdata\roaming\npm\cnpm PS1 because running scripts is prohibited on this system.

Paper notes: multi label learning ESMC (I don't understand it, but I haven't written it yet, so I'll put it here for a place temporarily)

重磅直播 | 相移法+多频外差之数学原理推导+实现
随机推荐
Data import and export for gbase 8s
dotnet-exec 0.4.0 released
STM32的DMA双缓冲模式详解
写shell脚本报错总结
哪个编程语言实现hello world最烦琐?
JS' sort() function
Kotlin compose listens to the soft keyboard and clicks enter to submit the event
Classification of gbase 8s locks
The consciousness of a programmer
ASEMI大功率场效应管和三极管的区别
Calculate student grade (virtual function and polymorphism)
[esp32 learning path 6 - Flash encryption]
ORA-00800: soft external error
Region of Halcon: generation of multiple regions (3)
OOP 向量加减(友元+拷贝构造)
Startup mode of SoC verification environment
js的sort()函数
【FLink】access closed classloader classloader. check-leaked-classloader
【图像融合】基于matlab方向离散余弦变换和主成分分析图像融合【含Matlab源码 1907期】
Gbase 8s parallel operation problem scenario description