dongyuan2652 2015-10-29 19:58
浏览 56
已采纳

yii 1.X应用程序日志问题

i have application that is hosted on Amazon EC2 instances i log my application using Yii 1.X Logger like this

Yii::log("Something i Log Here...", "info");

aaand , as we all know , i log my files into WEBROOT/protected/runtime/application.log file. Because of many logs i use, application.log file fill so quick , and , as i see , Yii or server change that file to application.log.1 and creates a new file called application.log .

My Question is , why, when new application.log file is created , Owner and Group are like some user nobody, and , when the new file is created, my code such as logging doesn't work anymore , no good permissions for writing into file as www-data user. Are there any chances to create new application.log file as user different as NOBODY?

I will provide Image , and look closer to application.log.3 ownership, same is happening with application.log , but i've changed the permissions by command

Image: 1

Anyone Please Help me about this.

  • 写回答

1条回答 默认 最新

  • duanping2695 2015-11-04 10:14
    关注

    If you see CFileLogRoute.php class, a private variable $_maxFileSize is defined as 1024KB. when ever the size of .log file exceeds beyond this limit, this class will rotate the log files by creating new log file.

    For more explanation please refer http://www.yiiframework.com/doc/api/1.1/CFileLogRoute

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100