Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
Merit Offline
New Member
 
Merit's Avatar
 
Posts: 14
Join Date: May 2005
Location: Toronto, ON
Parser log cleared / deleted early - 12-06-2006, 03:46 PM

I noticed recently after implementing the mail parser that my parser logs were being cleared rapidly. Despite having set the log churn in the mail pareser settings to 30 days, they were being deleted prior to this date.

I discovered after a little investigation that the daily cleanup cron job is what does the clearing of the parser log. The issue is that within the cron cleanup, there is a bug in which it uses the log clearing timeline as set in the "CPU Optimization & Server Settings" NOT the mail parser "Log Churn Timeline" as it should.

Thsi is simply due to the fact that in the code contained in cron_cleanup.php, there is no line that reads the value for the mail parser log churn, it just uses the one specified on the server settings page.

** No warranty, liability or support provided for implementing the following code. Do so at your own risk! **

Simply ADD the following line of code to the top of the if statement shown below in cron_cleanup.php in the modules\core folder:

$cleartime = DATENOW - (intval($_SWIFT["settings"]["pr_logchurndays"])*86400);

Code:
	if ($module->isRegistered(MODULE_PARSER))
	{
		$cleartime = DATENOW - (intval($_SWIFT["settings"]["pr_logchurndays"])*86400);
		$_parserlogidlist = array();
		$dbCore->query("SELECT `parserlogid` FROM `". TABLE_PREFIX ."parserlogs` WHERE `dateline` < '". intval($cleartime) ."';");
		while ($dbCore->nextRecord())
		{
			$_parserlogidlist[] = $dbCore->Record["parserlogid"];
		}

		if (count($_parserlogidlist))
		{
			$dbCore->query("DELETE FROM `". TABLE_PREFIX ."parserlogs` WHERE `parserlogid` IN (". buildIN($_parserlogidlist) .");");
			$dbCore->query("DELETE FROM `". TABLE_PREFIX ."parserlogdata` WHERE `parserlogid` IN (". buildIN($_parserlogidlist) .");");
		}

	}
   
Reply With Quote
Reply

Tags
cleared, deleted, log, parser

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Parser - PHP Fatal error raiseAlert() bdwyer SupportSuite, eSupport and LiveResponse 3 10-05-2006 10:28 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46