HOR-1646 "Store the new ProcessMaker log..."

This commit is contained in:
Luis Fernando Saisa Lopez
2016-08-18 17:23:40 -04:00
parent 8a92b8a6a4
commit 15269b05a1
7 changed files with 10 additions and 15 deletions

View File

@@ -267,7 +267,7 @@ class DataBaseMaintenance
// mysql_escape_string("';");
if (! @mysql_query( $sql )) {
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log');
$varRes = mysql_error() . "\n";
G::outRes( $varRes );
return false;
@@ -288,7 +288,7 @@ class DataBaseMaintenance
$sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'";
if (! @mysql_query( $sql )) {
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log');
$varRes = mysql_error() . "\n";
G::outRes( $varRes );
return false;
@@ -520,7 +520,7 @@ class DataBaseMaintenance
* @return string $tableSchema
*/
function getSchemaFromTable ($tablename)
{
{
//$tableSchema = "/* Structure for table `$tablename` */\n";
//$tableSchema .= "DROP TABLE IF EXISTS `$tablename`;\n\n";
$tableSchema = "";

View File

@@ -22,7 +22,6 @@ class PMException extends Exception
public function registerErrorLog($error, $token){
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'exception.log');
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'processmaker.log');
}
}

View File

@@ -4129,7 +4129,7 @@ class Processes
try {
$result = $scriptTask->create($processUid, $record);
} catch (Exception $e) {
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processImporter.log');
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processmaker.log');
}
}
} catch (Exception $e) {

View File

@@ -475,7 +475,7 @@ class EmailEvent
\PMFSendMessage($appUID, $configEmailData['MESS_ACCOUNT'], $emailTo, '', '', $subject,
$contentFile['prf_filename'], array(), array(), true, 0, $configEmailData);
} else {
\Bootstrap::registerMonolog('EmailEventMailError', 200, \G::LoadTranslation('ID_EMAIL_EVENT_CONFIGURATION_EMAIL', array($eventUid, $prj_uid)), ['eventUid' => $eventUid, 'prj_uid' => $prj_uid], SYS_SYS, 'emailEvent.log');
\Bootstrap::registerMonolog('EmailEventMailError', 200, \G::LoadTranslation('ID_EMAIL_EVENT_CONFIGURATION_EMAIL', array($eventUid, $prj_uid)), ['eventUid' => $eventUid, 'prj_uid' => $prj_uid], SYS_SYS, 'processmaker.log');
}
}
}
@@ -530,4 +530,3 @@ class EmailEvent
}
}
}

View File

@@ -303,7 +303,7 @@ class Light
$response['caseNumber'] = $aData['CASE_NUMBER'];
//Log
\Bootstrap::registerMonolog('create-case', 200, "Create case", ['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], SYS_SYS, 'mobileLogs.log');
\Bootstrap::registerMonolog('MobileCreateCase', 200, "Create case", ['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], SYS_SYS, 'processmaker.log');
} catch (Exception $e) {
$response['status'] = 'failure';
$response['message'] = $e->getMessage();
@@ -539,7 +539,7 @@ class Light
}
//Log
\Bootstrap::registerMonolog('route-case', 200, 'Route case', ['application_uid' => $applicationUid, 'usr_uid' => $userUid], SYS_SYS, 'mobileLogs.log');
\Bootstrap::registerMonolog('MobileRouteCase', 200, 'Route case', ['application_uid' => $applicationUid, 'usr_uid' => $userUid], SYS_SYS, 'processmaker.log');
} catch (\Exception $e) {
throw $e;
}
@@ -1343,4 +1343,3 @@ class Light
}
}

View File

@@ -661,10 +661,9 @@ class MessageApplication
,'inpDocUid'=> $inpDocUid
,'url' => $url
);
\Bootstrap::registerMonolog('MessageEventCron', $level, $message, $aContext, SYS_SYS, 'messageevent.log');
\Bootstrap::registerMonolog('MessageEventCron', $level, $message, $aContext, SYS_SYS, 'processmaker.log');
} catch (\Exception $e) {
throw $e;
}
}
}

View File

@@ -1211,7 +1211,7 @@ class TimerEvent
,'inpDocUid'=> $inpDocUid
,'url' => $url
);
\Bootstrap::registerMonolog('TimerEventCron', $level, $message, $aContext, SYS_SYS, 'timerevent.log');
\Bootstrap::registerMonolog('TimerEventCron', $level, $message, $aContext, SYS_SYS, 'processmaker.log');
} catch (\Exception $e) {
throw $e;
}
@@ -1733,4 +1733,3 @@ class TimerEvent
}
}
}