mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 17:44:48 +02:00
core: Add separate Debug class
Replaces 'debugMessage' by specialized debug function 'Debug::log'. This function takes the same arguments as the previous 'debugMessage'. A separate Debug class allows for further optimization and separation of concern.
This commit is contained in:
parent
9379854f7a
commit
c63af2e7ad
8 changed files with 44 additions and 40 deletions
|
@ -132,7 +132,7 @@ class JustETFBridge extends BridgeAbstract {
|
|||
|
||||
date_time_set($df, 0, 0);
|
||||
|
||||
// debugMessage(date_format($df, 'U'));
|
||||
// Debug::log(date_format($df, 'U'));
|
||||
|
||||
return date_format($df, 'U');
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ class JustETFBridge extends BridgeAbstract {
|
|||
$element = $article->find('div.subheadline', 0)
|
||||
or returnServerError('Date not found!');
|
||||
|
||||
// debugMessage($element->plaintext);
|
||||
// Debug::log($element->plaintext);
|
||||
|
||||
$date = trim(explode('|', $element->plaintext)[0]);
|
||||
|
||||
|
@ -223,7 +223,7 @@ class JustETFBridge extends BridgeAbstract {
|
|||
|
||||
$element->find('a', 0)->onclick = '';
|
||||
|
||||
// debugMessage($element->innertext);
|
||||
// Debug::log($element->innertext);
|
||||
|
||||
return $element->innertext;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ class JustETFBridge extends BridgeAbstract {
|
|||
$element = $html->find('div.infobox div.vallabel', 0)
|
||||
or returnServerError('Date not found!');
|
||||
|
||||
// debugMessage($element->plaintext);
|
||||
// Debug::log($element->plaintext);
|
||||
|
||||
$date = trim(explode("\r\n", $element->plaintext)[1]);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class WordPressPluginUpdateBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
private function getCachedDate($url){
|
||||
debugMessage('getting pubdate from url ' . $url . '');
|
||||
Debug::log('getting pubdate from url ' . $url . '');
|
||||
// Initialize cache
|
||||
$cache = Cache::create('FileCache');
|
||||
$cache->setPath(PATH_CACHE . 'pages/');
|
||||
|
|
|
@ -453,7 +453,7 @@ class XenForoBridge extends BridgeAbstract {
|
|||
|
||||
}
|
||||
|
||||
// debugMessage(date_format($df, 'U'));
|
||||
// Debug::log(date_format($df, 'U'));
|
||||
|
||||
return date_format($df, 'U');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue