From 0bf6612ea3394f8aa869f87bdc2840192adf0258 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 21 Oct 2021 06:04:27 +0000 Subject: [PATCH] "log" is replaced with the corresponding logging functions --- .../advancedcontentfilter.php | 2 +- blackout/blackout.php | 2 +- blogger/blogger.php | 4 ++-- buffer/buffer.php | 10 +++++----- catavatar/catavatar.php | 2 +- diaspora/diaspora.php | 18 ++++++++--------- fromapp/fromapp.php | 2 +- geocoordinates/geocoordinates.php | 8 ++++---- geonames/geonames.php | 2 +- gnot/gnot.php | 2 +- googlemaps/googlemaps.php | 2 +- group_text/group_text.php | 2 +- ifttt/ifttt.php | 10 +++++----- impressum/impressum.php | 2 +- js_upload/js_upload.php | 4 ++-- krynn/krynn.php | 2 +- leistungsschutzrecht/leistungsschutzrecht.php | 2 +- libertree/libertree.php | 4 ++-- newmemberwidget/newmemberwidget.php | 2 +- numfriends/numfriends.php | 2 +- openstreetmap/openstreetmap.php | 8 ++++---- opmlexport/opmlexport.php | 2 +- piwik/piwik.php | 2 +- planets/planets.php | 4 ++-- public_server/public_server.php | 4 ++-- pumpio/pumpio_sync.php | 2 +- randplace/randplace.php | 6 +++--- securemail/securemail.php | 2 +- tumblr/tumblr.php | 6 +++--- twitter/twitter.php | 20 +++++++++---------- wppost/wppost.php | 4 ++-- 31 files changed, 72 insertions(+), 72 deletions(-) diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index 99c8683c..41ddffdb 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -64,7 +64,7 @@ function advancedcontentfilter_install(App $a) Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition'); DBStructure::performUpdate(); - Logger::log("installed advancedcontentfilter"); + Logger::notice("installed advancedcontentfilter"); } /* diff --git a/blackout/blackout.php b/blackout/blackout.php index cfe4bbb7..18e74570 100644 --- a/blackout/blackout.php +++ b/blackout/blackout.php @@ -75,7 +75,7 @@ function blackout_redirect ($a, $b) { $date2 = 0; } if (( $date1 <= $now ) && ( $now <= $date2 )) { - Logger::log('redirecting user to blackout page'); + Logger::notice('redirecting user to blackout page'); System::externalRedirect($myurl); } } diff --git a/blogger/blogger.php b/blogger/blogger.php index 37cdba09..ff87476a 100644 --- a/blogger/blogger.php +++ b/blogger/blogger.php @@ -205,12 +205,12 @@ function blogger_send(App $a, array &$b) EOT; - Logger::log('blogger: data: ' . $xml, Logger::DATA); + Logger::debug('blogger: data: ' . $xml); if ($bl_blog !== 'test') { $x = DI::httpClient()->post($bl_blog, $xml)->getBody(); } - Logger::log('posted to blogger: ' . (($x) ? $x : ''), Logger::DEBUG); + Logger::info('posted to blogger: ' . (($x) ? $x : '')); } } diff --git a/buffer/buffer.php b/buffer/buffer.php index deaccfd0..61582feb 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -103,7 +103,7 @@ function buffer_connect(App $a) if (!$buffer->ok) { $o = 'Connect to Buffer!'; } else { - Logger::log("buffer_connect: authenticated"); + Logger::notice("buffer_connect: authenticated"); $o = DI::l10n()->t("You are now authenticated to buffer. "); $o .= '
' . DI::l10n()->t("return to the connector page") . ''; DI::pConfig()->set(local_user(), 'buffer','access_token', $buffer->access_token); @@ -306,7 +306,7 @@ function buffer_send(App $a, array &$b) $profiles = $buffer->go('/profiles'); if (is_array($profiles)) { - Logger::log("Will send these parameter ".print_r($b, true), Logger::DEBUG); + Logger::info("Will send these parameter ".print_r($b, true)); foreach ($profiles as $profile) { if (!$profile->default) @@ -343,7 +343,7 @@ function buffer_send(App $a, array &$b) $item = $b; $post = Plaintext::getPost($item, $limit, $includedlinks, $htmlmode); - Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG); + Logger::info("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true)); // The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures if (isset($post["image"])) { @@ -391,9 +391,9 @@ function buffer_send(App $a, array &$b) } //print_r($message); - Logger::log("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), Logger::DEBUG); + Logger::info("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true)); $ret = $buffer->go('/updates/create', $message); - Logger::log("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), Logger::DEBUG); + Logger::info("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true)); } } } diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php index 144148e7..181ac016 100644 --- a/catavatar/catavatar.php +++ b/catavatar/catavatar.php @@ -29,7 +29,7 @@ function catavatar_install() Hook::register('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings'); Hook::register('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post'); - Logger::log('registered catavatar'); + Logger::notice('registered catavatar'); } /** diff --git a/diaspora/diaspora.php b/diaspora/diaspora.php index 599e5223..e47f03b1 100644 --- a/diaspora/diaspora.php +++ b/diaspora/diaspora.php @@ -184,7 +184,7 @@ function diaspora_send(App $a, array &$b) { $hostname = DI::baseUrl()->getHostname(); - Logger::log('diaspora_send: invoked'); + Logger::notice('diaspora_send: invoked'); if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; @@ -208,14 +208,14 @@ function diaspora_send(App $a, array &$b) return; } - Logger::log('diaspora_send: prepare posting', Logger::DEBUG); + Logger::info('diaspora_send: prepare posting'); $handle = DI::pConfig()->get($b['uid'],'diaspora','handle'); $password = DI::pConfig()->get($b['uid'],'diaspora','password'); $aspect = DI::pConfig()->get($b['uid'],'diaspora','aspect'); if ($handle && $password) { - Logger::log('diaspora_send: all values seem to be okay', Logger::DEBUG); + Logger::info('diaspora_send: all values seem to be okay'); $title = $b['title']; $body = $b['body']; @@ -246,20 +246,20 @@ function diaspora_send(App $a, array &$b) require_once "addon/diaspora/diasphp.php"; try { - Logger::log('diaspora_send: prepare', Logger::DEBUG); + Logger::info('diaspora_send: prepare'); $conn = new Diaspora_Connection($handle, $password); - Logger::log('diaspora_send: try to log in '.$handle, Logger::DEBUG); + Logger::info('diaspora_send: try to log in '.$handle); $conn->logIn(); - Logger::log('diaspora_send: try to send '.$body, Logger::DEBUG); + Logger::info('diaspora_send: try to send '.$body); $conn->provider = $hostname; $conn->postStatusMessage($body, $aspect); - Logger::log('diaspora_send: success'); + Logger::notice('diaspora_send: success'); } catch (Exception $e) { - Logger::log("diaspora_send: Error submitting the post: " . $e->getMessage()); + Logger::notice("diaspora_send: Error submitting the post: " . $e->getMessage()); - Logger::log('diaspora_send: requeueing '.$b['uid'], Logger::DEBUG); + Logger::info('diaspora_send: requeueing '.$b['uid']); Worker::defer(); } diff --git a/fromapp/fromapp.php b/fromapp/fromapp.php index 073b632c..ab1e1518 100644 --- a/fromapp/fromapp.php +++ b/fromapp/fromapp.php @@ -15,7 +15,7 @@ function fromapp_install() Hook::register('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook'); Hook::register('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings'); Hook::register('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post'); - Logger::log("installed fromapp"); + Logger::notice("installed fromapp"); } function fromapp_settings_post($a, $post) diff --git a/geocoordinates/geocoordinates.php b/geocoordinates/geocoordinates.php index e892c258..83767918 100644 --- a/geocoordinates/geocoordinates.php +++ b/geocoordinates/geocoordinates.php @@ -48,25 +48,25 @@ function geocoordinates_resolve_item(&$item) $s = DI::httpClient()->fetch("https://api.opencagedata.com/geocode/v1/json?q=" . $coords[0] . "," . $coords[1] . "&key=" . $key . "&language=" . $language); if (!$s) { - Logger::log("API could not be queried", Logger::DEBUG); + Logger::info("API could not be queried"); return; } $data = json_decode($s); if ($data->status->code != "200") { - Logger::log("API returned error ".$data->status->code." ".$data->status->message, Logger::DEBUG); + Logger::info("API returned error ".$data->status->code." ".$data->status->message); return; } if (($data->total_results == 0) || (count($data->results) == 0)) { - Logger::log("No results found for coordinates ".$item["coord"], Logger::DEBUG); + Logger::info("No results found for coordinates ".$item["coord"]); return; } $item["location"] = $data->results[0]->formatted; - Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG); + Logger::info("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"]); if ($item["location"] != "") DI::cache()->set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]); diff --git a/geonames/geonames.php b/geonames/geonames.php index 052c416f..8ea183db 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -46,7 +46,7 @@ function geonames_post_hook(App $a, array &$item) * - The profile owner must have allowed our addon */ - Logger::log('geonames invoked'); + Logger::notice('geonames invoked'); if (!local_user()) { /* non-zero if this is a logged in user of this system */ return; diff --git a/gnot/gnot.php b/gnot/gnot.php index ca32d6d5..8b37fb1c 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -20,7 +20,7 @@ function gnot_install() { Hook::register('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post'); Hook::register('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail'); - Logger::log("installed gnot"); + Logger::notice("installed gnot"); } /** diff --git a/googlemaps/googlemaps.php b/googlemaps/googlemaps.php index 5555ec5a..687fac78 100644 --- a/googlemaps/googlemaps.php +++ b/googlemaps/googlemaps.php @@ -13,7 +13,7 @@ function googlemaps_install() { Hook::register('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location'); - Logger::log("installed googlemaps"); + Logger::notice("installed googlemaps"); } function googlemaps_location($a, &$item) diff --git a/group_text/group_text.php b/group_text/group_text.php index e0e61ee5..aa644588 100644 --- a/group_text/group_text.php +++ b/group_text/group_text.php @@ -14,7 +14,7 @@ function group_text_install() { Hook::register('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings'); Hook::register('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post'); - Logger::log("installed group_text"); + Logger::notice("installed group_text"); } /** diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index 2b1bdd79..813ebad5 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -96,16 +96,16 @@ function ifttt_post(App $a) $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname]); if (!DBA::isResult($user)) { - Logger::log('User ' . $nickname . ' not found.', Logger::DEBUG); + Logger::info('User ' . $nickname . ' not found.'); return; } $uid = $user['uid']; - Logger::log('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true), Logger::DEBUG); + Logger::info('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true)); if (!isset($_REQUEST['key'])) { - Logger::log('No key found.'); + Logger::notice('No key found.'); return; } @@ -113,7 +113,7 @@ function ifttt_post(App $a) // Check the key if ($key != DI::pConfig()->get($uid, 'ifttt', 'key')) { - Logger::log('Invalid key for user ' . $uid, Logger::DEBUG); + Logger::info('Invalid key for user ' . $uid); return; } @@ -124,7 +124,7 @@ function ifttt_post(App $a) } if (!in_array($item['type'], ['status', 'link', 'photo'])) { - Logger::log('Unknown item type ' . $item['type'], Logger::DEBUG); + Logger::info('Unknown item type ' . $item['type']); return; } diff --git a/impressum/impressum.php b/impressum/impressum.php index 4bbb419b..5a0a854b 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -20,7 +20,7 @@ function impressum_install() { Hook::register('load_config', 'addon/impressum/impressum.php', 'impressum_load_config'); Hook::register('about_hook', 'addon/impressum/impressum.php', 'impressum_show'); Hook::register('page_end', 'addon/impressum/impressum.php', 'impressum_footer'); - Logger::log("installed impressum Addon"); + Logger::notice("installed impressum Addon"); } function impressum_module() { diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 89f62ea4..e67d2ff0 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -61,7 +61,7 @@ function js_upload_post_init(App $a, &$b) $js_upload_jsonresponse = htmlspecialchars(json_encode($result), ENT_NOQUOTES); if (isset($result['error'])) { - Logger::log('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'], Logger::DEBUG); + Logger::info('mod/photos.php: photos_post(): error uploading photo: ' . $result['error']); echo json_encode($result); exit(); } @@ -85,7 +85,7 @@ function js_upload_post_end(App $a, &$b) { global $js_upload_jsonresponse; - Logger::log('upload_post_end'); + Logger::notice('upload_post_end'); if (!empty($js_upload_jsonresponse)) { echo $js_upload_jsonresponse; exit(); diff --git a/krynn/krynn.php b/krynn/krynn.php index 88aa84ea..66cdf573 100644 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -35,7 +35,7 @@ function krynn_install() { Hook::register('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings'); Hook::register('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); - Logger::log("installed krynn"); + Logger::notice("installed krynn"); } function krynn_post_hook($a, &$item) { diff --git a/leistungsschutzrecht/leistungsschutzrecht.php b/leistungsschutzrecht/leistungsschutzrecht.php index 8d00f1dd..c0e93f0c 100644 --- a/leistungsschutzrecht/leistungsschutzrecht.php +++ b/leistungsschutzrecht/leistungsschutzrecht.php @@ -159,7 +159,7 @@ function leistungsschutzrecht_cron($a,$b) { if($last) { $next = $last + 86400; if($next > time()) { - Logger::log('poll intervall not reached'); + Logger::notice('poll intervall not reached'); return; } } diff --git a/libertree/libertree.php b/libertree/libertree.php index 969b4b40..90910a39 100644 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -171,7 +171,7 @@ function libertree_post_local(&$a,&$b) { function libertree_send(&$a,&$b) { - Logger::log('libertree_send: invoked'); + Logger::notice('libertree_send: invoked'); if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; @@ -236,6 +236,6 @@ function libertree_send(&$a,&$b) { ]; $result = DI::httpClient()->post($ltree_blog, $params)->getBody(); - Logger::log('libertree: ' . $result); + Logger::notice('libertree: ' . $result); } } diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index 90f0c38d..a040ec31 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -16,7 +16,7 @@ use Friendica\Util\Strings; function newmemberwidget_install() { Hook::register( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init'); - Logger::log('newmemberwidget installed'); + Logger::notice('newmemberwidget installed'); } function newmemberwidget_network_mod_init ($a, $b) diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php index f12badeb..7644c62d 100644 --- a/numfriends/numfriends.php +++ b/numfriends/numfriends.php @@ -14,7 +14,7 @@ function numfriends_install() { Hook::register('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); Hook::register('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); - Logger::log("installed numfriends"); + Logger::notice("installed numfriends"); } /** diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index d1217597..e83388dd 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -31,7 +31,7 @@ function openstreetmap_install() Hook::register('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates'); Hook::register('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader'); - Logger::log("installed openstreetmap"); + Logger::notice("installed openstreetmap"); } function openstreetmap_load_config(\Friendica\App $a, ConfigFileLoader $loader) @@ -155,8 +155,8 @@ function openstreetmap_generate_map(&$a, &$b) $lat = $b['lat']; // round($b['lat'], 5); $lon = $b['lon']; // round($b['lon'], 5); - Logger::log('lat: ' . $lat, Logger::DATA); - Logger::log('lon: ' . $lon, Logger::DATA); + Logger::debug('lat: ' . $lat); + Logger::debug('lon: ' . $lon); $cardlink = ' ? AND `expire_notification_sent` <= ?", 5, DBA::NULL_DATETIME, DBA::NULL_DATETIME]); @@ -97,7 +97,7 @@ function public_server_cron($a, $b) } } - Logger::log("public_server: cron end"); + Logger::notice("public_server: cron end"); } function public_server_enotify(&$a, &$b) diff --git a/pumpio/pumpio_sync.php b/pumpio/pumpio_sync.php index 3e712d10..53a8da11 100644 --- a/pumpio/pumpio_sync.php +++ b/pumpio/pumpio_sync.php @@ -10,7 +10,7 @@ function pumpio_sync_run($argv, $argc) { if (function_exists('sys_getloadavg')) { $load = sys_getloadavg(); if (intval($load[0]) > DI::config()->get('system', 'maxloadavg', 50)) { - Logger::log('system: load ' . $load[0] . ' too high. Pumpio sync deferred to next scheduled run.'); + Logger::notice('system: load ' . $load[0] . ' too high. Pumpio sync deferred to next scheduled run.'); return; } } diff --git a/randplace/randplace.php b/randplace/randplace.php index 3576fef8..d831bfe3 100644 --- a/randplace/randplace.php +++ b/randplace/randplace.php @@ -44,7 +44,7 @@ function randplace_install() { Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); - Logger::log("installed randplace"); + Logger::notice("installed randplace"); } @@ -58,7 +58,7 @@ function randplace_uninstall() { * */ - Logger::log("removed randplace"); + Logger::notice("removed randplace"); } @@ -74,7 +74,7 @@ function randplace_post_hook($a, &$item) { * */ - Logger::log('randplace invoked'); + Logger::notice('randplace invoked'); if(! local_user()) /* non-zero if this is a logged in user of this system */ return; diff --git a/securemail/securemail.php b/securemail/securemail.php index 88e486bb..9ab596ab 100644 --- a/securemail/securemail.php +++ b/securemail/securemail.php @@ -23,7 +23,7 @@ function securemail_install() Hook::register('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare', 10); - Logger::log('installed securemail'); + Logger::notice('installed securemail'); } /** diff --git a/tumblr/tumblr.php b/tumblr/tumblr.php index 83c0419f..0359d953 100644 --- a/tumblr/tumblr.php +++ b/tumblr/tumblr.php @@ -470,11 +470,11 @@ function tumblr_send(App $a, array &$b) { //print_r($params); if ($ret_code == 201) { - Logger::log('tumblr_send: success'); + Logger::notice('tumblr_send: success'); } elseif ($ret_code == 403) { - Logger::log('tumblr_send: authentication failure'); + Logger::notice('tumblr_send: authentication failure'); } else { - Logger::log('tumblr_send: general error: ' . print_r($x,true)); + Logger::notice('tumblr_send: general error', ['error' => $x]); } } } diff --git a/twitter/twitter.php b/twitter/twitter.php index 1c54c9ae..e9c9d259 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1158,7 +1158,7 @@ function twitter_fetchtimeline(App $a, $uid) } } DI::pConfig()->set($uid, 'twitter', 'lastid', $lastid); - Logger::log('Last ID for user ' . $uid . ' is now ' . $lastid, Logger::DEBUG); + Logger::info('Last ID for user ' . $uid . ' is now ' . $lastid); } function twitter_fix_avatar($avatar) @@ -1851,7 +1851,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, $posts[] = $post; } - Logger::log("twitter_fetchparentposts: Fetching " . count($posts) . " parents", Logger::DEBUG); + Logger::info("twitter_fetchparentposts: Fetching " . count($posts) . " parents"); $posts = array_reverse($posts); @@ -1867,7 +1867,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, $postarray["id"] = $item; - Logger::log('twitter_fetchparentpost: User ' . $self["nick"] . ' posted parent timeline item ' . $item); + Logger::notice('twitter_fetchparentpost: User ' . $self["nick"] . ' posted parent timeline item ' . $item); } } } @@ -1969,12 +1969,12 @@ function twitter_fetchhometimeline(App $a, $uid) twitter_fetchparentposts($a, $uid, $post, $connection, $self); } - Logger::log('Preparing post ' . $post->id_str . ' for user ' . $uid, Logger::DEBUG); + Logger::info('Preparing post ' . $post->id_str . ' for user ' . $uid); $postarray = twitter_createpost($a, $uid, $post, $self, $create_user, true, false); if (empty($postarray['body']) || trim($postarray['body']) == "") { - Logger::log('Empty body for post ' . $post->id_str . ' and user ' . $uid, Logger::DEBUG); + Logger::info('Empty body for post ' . $post->id_str . ' and user ' . $uid); continue; } @@ -1990,12 +1990,12 @@ function twitter_fetchhometimeline(App $a, $uid) $item = Item::insert($postarray, $notify); $postarray["id"] = $item; - Logger::log('User ' . $uid . ' posted home timeline item ' . $item); + Logger::notice('User ' . $uid . ' posted home timeline item ' . $item); } } DI::pConfig()->set($uid, 'twitter', 'lasthometimelineid', $lastid); - Logger::log('Last timeline ID for user ' . $uid . ' is now ' . $lastid, Logger::DEBUG); + Logger::info('Last timeline ID for user ' . $uid . ' is now ' . $lastid); // Fetching mentions $lastid = DI::pConfig()->get($uid, 'twitter', 'lastmentionid'); @@ -2020,7 +2020,7 @@ function twitter_fetchhometimeline(App $a, $uid) $posts = array_reverse($items); - Logger::log("Fetching mentions for user " . $uid . " " . sizeof($posts) . " items", Logger::DEBUG); + Logger::info("Fetching mentions for user " . $uid . " " . sizeof($posts) . " items"); if (count($posts)) { foreach ($posts as $post) { @@ -2044,13 +2044,13 @@ function twitter_fetchhometimeline(App $a, $uid) $item = Item::insert($postarray); - Logger::log('User ' . $uid . ' posted mention timeline item ' . $item); + Logger::notice('User ' . $uid . ' posted mention timeline item ' . $item); } } DI::pConfig()->set($uid, 'twitter', 'lastmentionid', $lastid); - Logger::log('Last mentions ID for user ' . $uid . ' is now ' . $lastid, Logger::DEBUG); + Logger::info('Last mentions ID for user ' . $uid . ' is now ' . $lastid); } function twitter_fetch_own_contact(App $a, $uid) diff --git a/wppost/wppost.php b/wppost/wppost.php index 825593ae..c78157c8 100644 --- a/wppost/wppost.php +++ b/wppost/wppost.php @@ -322,11 +322,11 @@ function wppost_send(&$a, &$b) EOT; - Logger::log('wppost: data: ' . $xml, Logger::DATA); + Logger::debug('wppost: data: ' . $xml); if ($wp_blog !== 'test') { $x = DI::httpClient()->post($wp_blog, $xml)->getBody(); } - Logger::log('posted to wordpress: ' . (($x) ? $x : ''), Logger::DEBUG); + Logger::info('posted to wordpress: ' . (($x) ? $x : '')); } }