You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created by: Russ Back ([email protected]) on 2015/03/24 08:31:58 +0000
Votes at time of UserVoice import: 2
We’ve found and issue when using https://papertrailapp.com/ monitoring on the runtime logs for Craft in that Yii’s log rotate policy works in a way that prevents Papertrail (or rather the underlying remote_syslog2 service) from detecting when logs are rotated. Basically it means that when the logs are rotated the monitoring falls off.
I’ve looked into the code and spoken to their support team and enabling rotateByCopy should fix the issue:
This discussion was converted from issue #1145 on July 13, 2021 04:02.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We’ve found and issue when using https://papertrailapp.com/ monitoring on the runtime logs for Craft in that Yii’s log rotate policy works in a way that prevents Papertrail (or rather the underlying remote_syslog2 service) from detecting when logs are rotated. Basically it means that when the logs are rotated the monitoring falls off.
I’ve looked into the code and spoken to their support team and enabling rotateByCopy should fix the issue:
http://www.yiiframework.com/doc/api/1.1/CFileLogRoute
https://github.com/yiisoft/yii/blob/1.1.16/framework/logging/CFileLogRoute.php#L171
I’ve done this by making the change below in bold to Craft’s FileLogRoute class:
public function init()
{
$this->setLogPath(craft()->path->getLogPath());
$this->rotateByCopy = craft()->config->get('rotateLogFilesByCopy') ? true : false;
$this->levels = craft()->config->get('devMode') ? '' : 'error,warning';
$this->filter = craft()->config->get('devMode') ? 'Craft\LogFilter' : null;
parent::init();
}
This enables us to set that property in Craft’s general config.
Could this be rolled into a future release so that we’re not overwriting the core?
Beta Was this translation helpful? Give feedback.
All reactions