Better log

This commit is contained in:
Laurent Destailleur 2018-06-01 17:20:49 +02:00
parent 3f6d11cf26
commit b094ae953e
3 changed files with 9 additions and 5 deletions

View File

@ -213,12 +213,15 @@ class CMailFile
}
// Define if there is at least one file
foreach ($filename_list as $i => $val)
if (is_array($filename_list))
{
if ($filename_list[$i])
foreach ($filename_list as $i => $val)
{
$this->atleastonefile=1;
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i], LOG_DEBUG);
if ($filename_list[$i])
{
$this->atleastonefile=1;
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i], LOG_DEBUG);
}
}
}

View File

@ -735,7 +735,7 @@ abstract class CommonObject
if ($id_type_contact == 0)
{
$this->error='CODE_NOT_VALID_FOR_THIS_ELEMENT';
dol_syslog("CODE_NOT_VALID_FOR_THIS_ELEMENT");
dol_syslog("CODE_NOT_VALID_FOR_THIS_ELEMENT: Code type of contact '".$type_contact."' does not exists or is not active for element ".$this->element.", we can ignore it");
return -3;
}

View File

@ -269,6 +269,7 @@ class Stripe extends CommonObject
//$a = \Stripe\Stripe::getApiKey();
//var_dump($a);var_dump($stripeacc);exit;
dol_syslog("Try to create card dataforcard = ".dol_json_encode($dataforcard));
try {
if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage
$card = $cu->sources->create($dataforcard);