There is no problem not worth solving, and no technology not worth learning!

Troubleshooting analysis of log files of the day is not created when logs are written in Laravel 6

在 Laravel 6 中写入日志时,未创建当时的日志文件。写入日志的时候,操作系统的时间为北京时间:2023-09-15 11 ,但是并未生成 laravel-2023-09-15.log

1. When writing a log in Laravel 6, the log file at that time was not created. When writing the log, the time of the operating system is Beijing time: 2023-09-15 11 , but laravel-2023-09-15.log is not generated. as shown in Figure 1

在 Laravel 6 中写入日志时,未创建当时的日志文件。写入日志的时候,操作系统的时间为北京时间:2023-09-15 11 ,但是并未生成 laravel-2023-09-15.log
Figure 1

2. Found only Laravel-2023-09-14.log, print output: config(app.timezone). The reason for the discovery is that the time zone set in the Laravel program is: ETC/GMT+8. as shown in Figure 2

发现仅生成了 laravel-2023-09-14.log,打印输出:config('app.timezone')。发现原因在于 Laravel 程序中设置的时区为:Etc/GMT+8
Figure 2

echo config('app.timezone');
exit;


3. In the “ETC” area, there is a positive sign in the west of Greenwich’s standard time, and the name of the east area has a minus sign. ETC/GMT+8 can be understood as the West Eight District, 16 hours earlier than Beijing time. So when writing the log, the time of the Laravel program is: 2023-09-14 19.

PHP / Laravel / Yii2 Legacy Project Maintenance & Long-Term Technical Support

If your PHP / Laravel / Yii2 project is already in production but needs bug fixing, API troubleshooting, performance optimization, developer handover support, or long-term maintenance, feel free to contact me for remote technical support.

Ideal For:
✅ PHP legacy systems without active maintenance
✅ Laravel / Yii2 project bug fixes
✅ Admin panel feature iterations
✅ RESTful API troubleshooting
✅ MySQL / Redis / Nginx performance issues
✅ Long-term remote part-time maintenance

We can start with a small task:
✅ Production error troubleshooting
✅ API issue analysis
✅ Slow query and performance bottleneck diagnosis
✅ Initial code structure review
✅ Deployment environment and log inspection

If you would like to discuss your project, please contact me and mention: PHP Maintenance Consultation.

Contact Me:
Telegram: @shuijingwan
WeChat: 13980074657
Email: shuijingwanwq@gmail.com

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.