Some extra debug logging to help with fixes testing

This commit is contained in:
2025-05-24 12:37:12 +10:00
parent 6c501cc29d
commit 148d19bbce
5 changed files with 20 additions and 11 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Classes\LDAP;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use LdapRecord\LdapRecordException;
use App\Exceptions\Import\GeneralException;
@@ -16,6 +17,8 @@ use App\Ldap\Entry;
*/
abstract class Import
{
private const LOGKEY = 'aI-';
// Valid LDIF commands
protected const LDAP_IMPORT_ADD = 1;
protected const LDAP_IMPORT_DELETE = 2;
@@ -57,6 +60,8 @@ abstract class Import
$o->save();
} catch (LdapRecordException $e) {
Log::error(sprintf('%s:Import Commit Error',self::LOGKEY),['e'=>$e->getMessage(),'detailed'=>$e->getDetailedError()]);
if ($e->getDetailedError())
return collect([
'dn'=>$o->getDN(),
@@ -76,6 +81,8 @@ abstract class Import
]);
}
Log::debug(sprintf('%s:Import Commited',self::LOGKEY));
return collect(['dn'=>$o->getDN(),'result'=>__('Created')]);
default: