mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
Improve Logger calls
- Replace various deprecated Logger::log calls - Reassign log level for verbose log calls
This commit is contained in:
parent
1917f04153
commit
8c1db51a76
9 changed files with 29 additions and 24 deletions
|
@ -6,6 +6,7 @@ namespace Friendica\Util;
|
|||
|
||||
use Friendica\Core\Logger;
|
||||
use DOMXPath;
|
||||
use Friendica\Core\System;
|
||||
use SimpleXMLElement;
|
||||
|
||||
/**
|
||||
|
@ -422,10 +423,11 @@ class XML
|
|||
|
||||
$x = @simplexml_load_string($s);
|
||||
if (!$x) {
|
||||
Logger::log('libxml: parse: error: ' . $s, Logger::DATA);
|
||||
Logger::error('Error(s) while parsing XML string.', ['callstack' => System::callstack()]);
|
||||
foreach (libxml_get_errors() as $err) {
|
||||
Logger::log('libxml: parse: ' . $err->code." at ".$err->line.":".$err->column." : ".$err->message, Logger::DATA);
|
||||
Logger::info('libxml error', ['code' => $err->code, 'position' => $err->line . ":" . $err->column, 'message' => $err->message]);
|
||||
}
|
||||
Logger::debug('Erroring XML string', ['xml' => $s]);
|
||||
libxml_clear_errors();
|
||||
}
|
||||
return $x;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue