1
0
Fork 0

Logger Levels

update logger levels in calls
This commit is contained in:
Adam Magness 2018-10-30 09:58:45 -04:00
commit 50da89d861
86 changed files with 673 additions and 673 deletions

View file

@ -35,7 +35,7 @@ function acl_content(App $a)
$search = $_REQUEST['query'];
}
Logger::log("Searching for ".$search." - type ".$type." conversation ".$conv_id, LOGGER_DEBUG);
Logger::log("Searching for ".$search." - type ".$type." conversation ".$conv_id, Logger::DEBUG);
if ($search != '') {
$sql_extra = "AND `name` LIKE '%%" . DBA::escape($search) . "%%'";

View file

@ -911,7 +911,7 @@ function admin_page_summary(App $a)
$users+= $u['count'];
}
Logger::log('accounts: ' . print_r($accounts, true), LOGGER_DATA);
Logger::log('accounts: ' . print_r($accounts, true), Logger::DATA);
$pending = Register::getPendingCount();
@ -2400,12 +2400,12 @@ function admin_page_logs_post(App $a)
function admin_page_logs(App $a)
{
$log_choices = [
LOGGER_WARNING => 'Warning',
LOGGER_INFO => 'Info',
LOGGER_TRACE => 'Trace',
LOGGER_DEBUG => 'Debug',
LOGGER_DATA => 'Data',
LOGGER_ALL => 'All'
Logger::WARNING => 'Warning',
Logger::INFO => 'Info',
Logger::TRACE => 'Trace',
Logger::DEBUG => 'Debug',
Logger::DATA => 'Data',
Logger::ALL => 'All'
];
if (ini_get('log_errors')) {
@ -2500,7 +2500,7 @@ function admin_page_features_post(App $a)
{
BaseModule::checkFormSecurityTokenRedirectOnError('/admin/features', 'admin_manage_features');
Logger::log('postvars: ' . print_r($_POST, true), LOGGER_DATA);
Logger::log('postvars: ' . print_r($_POST, true), Logger::DATA);
$features = Feature::get(false);

View file

@ -212,7 +212,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
$params['page'] = 2;
}
Logger::log('Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params, true), LOGGER_DATA);
Logger::log('Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params, true), Logger::DATA);
/*
*
@ -224,7 +224,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
$res = Network::post($dfrn_confirm, $params, null, $redirects, 120)->getBody();
Logger::log(' Confirm: received data: ' . $res, LOGGER_DATA);
Logger::log(' Confirm: received data: ' . $res, Logger::DATA);
// Now figure out what they responded. Try to be robust if the remote site is
// having difficulty and throwing up errors of some kind.
@ -430,7 +430,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
Logger::log('dfrn_confirm: requestee contacted: ' . $node);
Logger::log('dfrn_confirm: request: POST=' . print_r($_POST, true), LOGGER_DATA);
Logger::log('dfrn_confirm: request: POST=' . print_r($_POST, true), Logger::DATA);
// If $aes_key is set, both of these items require unpacking from the hex transport encoding.

View file

@ -18,7 +18,7 @@ use Friendica\Protocol\Diaspora;
require_once 'include/items.php';
function dfrn_notify_post(App $a) {
Logger::log(__function__, LOGGER_TRACE);
Logger::log(__function__, Logger::TRACE);
$postdata = file_get_contents('php://input');
@ -118,7 +118,7 @@ function dfrn_notify_post(App $a) {
$importer = Contact::updateSslPolicy($importer, $ssl_policy);
Logger::log('data: ' . $data, LOGGER_DATA);
Logger::log('data: ' . $data, Logger::DATA);
if ($dissolve == 1) {
// Relationship is dissolved permanently
@ -140,7 +140,7 @@ function dfrn_notify_post(App $a) {
}
$rawkey = hex2bin(trim($key));
Logger::log('rino: md5 raw key: ' . md5($rawkey), LOGGER_DATA);
Logger::log('rino: md5 raw key: ' . md5($rawkey), Logger::DATA);
$final_key = '';
@ -170,10 +170,10 @@ function dfrn_notify_post(App $a) {
System::xmlExit(0, "Invalid sent version '$rino_remote'");
}
Logger::log('rino: decrypted data: ' . $data, LOGGER_DATA);
Logger::log('rino: decrypted data: ' . $data, Logger::DATA);
}
Logger::log('Importing post from ' . $importer['addr'] . ' to ' . $importer['nickname'] . ' with the RINO ' . $rino_remote . ' encryption.', LOGGER_DEBUG);
Logger::log('Importing post from ' . $importer['addr'] . ' to ' . $importer['nickname'] . ' with the RINO ' . $rino_remote . ' encryption.', Logger::DEBUG);
$ret = DFRN::import($data, $importer);
System::xmlExit($ret, 'Processed');
@ -204,7 +204,7 @@ function dfrn_dispatch_public($postdata)
System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
}
Logger::log('Importing post from ' . $msg['author'] . ' with the public envelope.', LOGGER_DEBUG);
Logger::log('Importing post from ' . $msg['author'] . ' with the public envelope.', Logger::DEBUG);
// Now we should be able to import it
$ret = DFRN::import($msg['message'], $importer);
@ -237,7 +237,7 @@ function dfrn_dispatch_private($user, $postdata)
System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
}
Logger::log('Importing post from ' . $msg['author'] . ' to ' . $user['nickname'] . ' with the private envelope.', LOGGER_DEBUG);
Logger::log('Importing post from ' . $msg['author'] . ' to ' . $user['nickname'] . ' with the private envelope.', Logger::DEBUG);
// Now we should be able to import it
$ret = DFRN::import($msg['message'], $importer);
@ -277,7 +277,7 @@ function dfrn_notify_content(App $a) {
'type' => $type, 'last_update' => $last_update];
DBA::insert('challenge', $fields);
Logger::log('challenge=' . $hash, LOGGER_DATA);
Logger::log('challenge=' . $hash, Logger::DATA);
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $a->argv[1]]);
if (!DBA::isResult($user)) {
@ -317,7 +317,7 @@ function dfrn_notify_content(App $a) {
killme();
}
Logger::log("Remote rino version: ".$rino_remote." for ".$importer["url"], LOGGER_DATA);
Logger::log("Remote rino version: ".$rino_remote." for ".$importer["url"], Logger::DATA);
$challenge = '';
$encrypted_id = '';
@ -345,7 +345,7 @@ function dfrn_notify_content(App $a) {
$rino = Config::get('system', 'rino_encrypt');
$rino = intval($rino);
Logger::log("Local rino version: ". $rino, LOGGER_DATA);
Logger::log("Local rino version: ". $rino, Logger::DATA);
// if requested rino is lower than enabled local rino, lower local rino version
// if requested rino is higher than enabled local rino, reply with local rino

View file

@ -105,7 +105,7 @@ function dfrn_poll_init(App $a)
if (DBA::isResult($r)) {
$s = Network::fetchUrl($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check');
Logger::log("dfrn_poll: old profile returns " . $s, LOGGER_DATA);
Logger::log("dfrn_poll: old profile returns " . $s, Logger::DATA);
if (strlen($s)) {
$xml = XML::parseString($s);
@ -192,7 +192,7 @@ function dfrn_poll_init(App $a)
}
if ($final_dfrn_id != $orig_id) {
Logger::log('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG);
Logger::log('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, Logger::DEBUG);
// did not decode properly - cannot trust this site
System::xmlExit(3, 'Bad decryption');
}
@ -284,7 +284,7 @@ function dfrn_poll_post(App $a)
}
if ($final_dfrn_id != $orig_id) {
Logger::log('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, LOGGER_DEBUG);
Logger::log('profile_check: ' . $final_dfrn_id . ' != ' . $orig_id, Logger::DEBUG);
// did not decode properly - cannot trust this site
System::xmlExit(3, 'Bad decryption');
}
@ -373,7 +373,7 @@ function dfrn_poll_post(App $a)
// NOTREACHED
} else {
// Update the writable flag if it changed
Logger::log('dfrn_poll: post request feed: ' . print_r($_POST, true), LOGGER_DATA);
Logger::log('dfrn_poll: post request feed: ' . print_r($_POST, true), Logger::DATA);
if ($dfrn_version >= 2.21) {
if ($perm === 'rw') {
$writable = 1;
@ -511,12 +511,12 @@ function dfrn_poll_content(App $a)
])->getBody();
}
Logger::log("dfrn_poll: sec profile: " . $s, LOGGER_DATA);
Logger::log("dfrn_poll: sec profile: " . $s, Logger::DATA);
if (strlen($s) && strstr($s, '<?xml')) {
$xml = XML::parseString($s);
Logger::log('dfrn_poll: profile: parsed xml: ' . print_r($xml, true), LOGGER_DATA);
Logger::log('dfrn_poll: profile: parsed xml: ' . print_r($xml, true), Logger::DATA);
Logger::log('dfrn_poll: secure profile: challenge: ' . $xml->challenge . ' expecting ' . $hash);
Logger::log('dfrn_poll: secure profile: sec: ' . $xml->sec . ' expecting ' . $sec);

View file

@ -298,7 +298,7 @@ function dfrn_request_post(App $a)
$network = Protocol::DFRN;
}
Logger::log('dfrn_request: url: ' . $url . ',network=' . $network, LOGGER_DEBUG);
Logger::log('dfrn_request: url: ' . $url . ',network=' . $network, Logger::DEBUG);
if ($network === Protocol::DFRN) {
$ret = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `self` = 0 LIMIT 1",

View file

@ -75,7 +75,7 @@ function display_init(App $a)
}
if (!empty($_SERVER['HTTP_ACCEPT']) && strstr($_SERVER['HTTP_ACCEPT'], 'application/atom+xml')) {
Logger::log('Directly serving XML for id '.$item["id"], LOGGER_DEBUG);
Logger::log('Directly serving XML for id '.$item["id"], Logger::DEBUG);
displayShowFeed($item["id"], false);
}

View file

@ -48,7 +48,7 @@ function events_init(App $a)
function events_post(App $a)
{
Logger::log('post: ' . print_r($_REQUEST, true), LOGGER_DATA);
Logger::log('post: ' . print_r($_REQUEST, true), Logger::DATA);
if (!local_user()) {
return;

View file

@ -57,7 +57,7 @@ function item_post(App $a) {
Addon::callHooks('post_local_start', $_REQUEST);
Logger::log('postvars ' . print_r($_REQUEST, true), LOGGER_DATA);
Logger::log('postvars ' . print_r($_REQUEST, true), Logger::DATA);
$api_source = defaults($_REQUEST, 'api_source', false);
@ -73,7 +73,7 @@ function item_post(App $a) {
*/
if (!$preview && !empty($_REQUEST['post_id_random'])) {
if (!empty($_SESSION['post-random']) && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
Logger::log("item post: duplicate post", LOGGER_DEBUG);
Logger::log("item post: duplicate post", Logger::DEBUG);
item_post_return(System::baseUrl(), $api_source, $return_path);
} else {
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
@ -154,7 +154,7 @@ function item_post(App $a) {
// Check for multiple posts with the same message id (when the post was created via API)
if (($message_id != '') && ($profile_uid != 0)) {
if (Item::exists(['uri' => $message_id, 'uid' => $profile_uid])) {
Logger::log("Message with URI ".$message_id." already exists for user ".$profile_uid, LOGGER_DEBUG);
Logger::log("Message with URI ".$message_id." already exists for user ".$profile_uid, Logger::DEBUG);
return 0;
}
}
@ -862,7 +862,7 @@ function item_post_return($baseurl, $api_source, $return_path)
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
}
Logger::log('post_json: ' . print_r($json, true), LOGGER_DEBUG);
Logger::log('post_json: ' . print_r($json, true), Logger::DEBUG);
echo json_encode($json);
killme();

View file

@ -204,22 +204,22 @@ function nodeinfo_cron() {
Config::set('nodeinfo', 'active_users_halfyear', $active_users_halfyear);
Config::set('nodeinfo', 'active_users_monthly', $active_users_monthly);
Logger::log('total_users: ' . $total_users . '/' . $active_users_halfyear. '/' . $active_users_monthly, LOGGER_DEBUG);
Logger::log('total_users: ' . $total_users . '/' . $active_users_halfyear. '/' . $active_users_monthly, Logger::DEBUG);
}
$local_posts = DBA::count('thread', ["`wall` AND NOT `deleted` AND `uid` != 0"]);
Config::set('nodeinfo', 'local_posts', $local_posts);
Logger::log('local_posts: ' . $local_posts, LOGGER_DEBUG);
Logger::log('local_posts: ' . $local_posts, Logger::DEBUG);
$local_comments = DBA::count('item', ["`origin` AND `id` != `parent` AND NOT `deleted` AND `uid` != 0"]);
Config::set('nodeinfo', 'local_comments', $local_comments);
Logger::log('local_comments: ' . $local_comments, LOGGER_DEBUG);
Logger::log('local_comments: ' . $local_comments, Logger::DEBUG);
// Now trying to register
$url = 'http://the-federation.info/register/'.$a->getHostName();
Logger::log('registering url: '.$url, LOGGER_DEBUG);
Logger::log('registering url: '.$url, Logger::DEBUG);
$ret = Network::fetchUrl($url);
Logger::log('registering answer: '.$ret, LOGGER_DEBUG);
Logger::log('registering answer: '.$ret, Logger::DEBUG);
Logger::log('cron_end');
}

View file

@ -17,7 +17,7 @@ function openid_content(App $a) {
if($noid)
$a->internalRedirect();
Logger::log('mod_openid ' . print_r($_REQUEST,true), LOGGER_DATA);
Logger::log('mod_openid ' . print_r($_REQUEST,true), Logger::DATA);
if((x($_GET,'openid_mode')) && (x($_SESSION,'openid'))) {

View file

@ -142,9 +142,9 @@ function photos_init(App $a) {
function photos_post(App $a)
{
Logger::log('mod-photos: photos_post: begin' , LOGGER_DEBUG);
Logger::log('mod_photos: REQUEST ' . print_r($_REQUEST, true), LOGGER_DATA);
Logger::log('mod_photos: FILES ' . print_r($_FILES, true), LOGGER_DATA);
Logger::log('mod-photos: photos_post: begin' , Logger::DEBUG);
Logger::log('mod_photos: REQUEST ' . print_r($_REQUEST, true), Logger::DATA);
Logger::log('mod_photos: FILES ' . print_r($_FILES, true), Logger::DATA);
$phototypes = Image::supportedTypes();
@ -707,7 +707,7 @@ function photos_post(App $a)
$album = !empty($_REQUEST['album']) ? notags(trim($_REQUEST['album'])) : '';
$newalbum = !empty($_REQUEST['newalbum']) ? notags(trim($_REQUEST['newalbum'])) : '';
Logger::log('mod/photos.php: photos_post(): album= ' . $album . ' newalbum= ' . $newalbum , LOGGER_DEBUG);
Logger::log('mod/photos.php: photos_post(): album= ' . $album . ' newalbum= ' . $newalbum , Logger::DEBUG);
if (!strlen($album)) {
if (strlen($newalbum)) {
@ -800,7 +800,7 @@ function photos_post(App $a)
$type = Image::guessType($filename);
}
Logger::log('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', LOGGER_DEBUG);
Logger::log('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', Logger::DEBUG);
$maximagesize = Config::get('system', 'maximagesize');
@ -820,14 +820,14 @@ function photos_post(App $a)
return;
}
Logger::log('mod/photos.php: photos_post(): loading the contents of ' . $src , LOGGER_DEBUG);
Logger::log('mod/photos.php: photos_post(): loading the contents of ' . $src , Logger::DEBUG);
$imagedata = @file_get_contents($src);
$image = new Image($imagedata, $type);
if (!$image->isValid()) {
Logger::log('mod/photos.php: photos_post(): unable to process image' , LOGGER_DEBUG);
Logger::log('mod/photos.php: photos_post(): unable to process image' , Logger::DEBUG);
notice(L10n::t('Unable to process image.') . EOL);
@unlink($src);
$foo = 0;
@ -856,7 +856,7 @@ function photos_post(App $a)
$r = Photo::store($image, $page_owner_uid, $visitor, $photo_hash, $filename, $album, 0 , 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny);
if (!$r) {
Logger::log('mod/photos.php: photos_post(): image store failed', LOGGER_DEBUG);
Logger::log('mod/photos.php: photos_post(): image store failed', Logger::DEBUG);
notice(L10n::t('Image upload failed.') . EOL);
killme();
}

View file

@ -122,7 +122,7 @@ function poco_init(App $a) {
$itemsPerPage = ((x($_GET, 'count') && intval($_GET['count'])) ? intval($_GET['count']) : $totalResults);
if ($global) {
Logger::log("Start global query", LOGGER_DEBUG);
Logger::log("Start global query", Logger::DEBUG);
$contacts = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND NOT `hide` AND `network` IN ('%s', '%s', '%s') AND `updated` > `last_failure`
ORDER BY `updated` DESC LIMIT %d, %d",
DBA::escape($update_limit),
@ -133,7 +133,7 @@ function poco_init(App $a) {
intval($itemsPerPage)
);
} elseif ($system_mode) {
Logger::log("Start system mode query", LOGGER_DEBUG);
Logger::log("Start system mode query", Logger::DEBUG);
$contacts = q("SELECT `contact`.*, `profile`.`about` AS `pabout`, `profile`.`locality` AS `plocation`, `profile`.`pub_keywords`,
`profile`.`gender` AS `pgender`, `profile`.`address` AS `paddress`, `profile`.`region` AS `pregion`,
`profile`.`postal-code` AS `ppostalcode`, `profile`.`country-name` AS `pcountry`, `user`.`account-type`
@ -145,7 +145,7 @@ function poco_init(App $a) {
intval($itemsPerPage)
);
} else {
Logger::log("Start query for user " . $user['nickname'], LOGGER_DEBUG);
Logger::log("Start query for user " . $user['nickname'], Logger::DEBUG);
$contacts = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0
AND (`success_update` >= `failure_update` OR `last-item` >= `failure_update`)
AND `network` IN ('%s', '%s', '%s', '%s') $sql_extra LIMIT %d, %d",
@ -158,7 +158,7 @@ function poco_init(App $a) {
intval($itemsPerPage)
);
}
Logger::log("Query done", LOGGER_DEBUG);
Logger::log("Query done", Logger::DEBUG);
$ret = [];
if (x($_GET, 'sorted')) {
@ -370,7 +370,7 @@ function poco_init(App $a) {
} else {
System::httpExit(500);
}
Logger::log("End of poco", LOGGER_DEBUG);
Logger::log("End of poco", Logger::DEBUG);
if ($format === 'xml') {
header('Content-type: text/xml');

View file

@ -54,7 +54,7 @@ function poke_init(App $a)
$parent = (x($_GET,'parent') ? intval($_GET['parent']) : 0);
Logger::log('poke: verb ' . $verb . ' contact ' . $contact_id, LOGGER_DEBUG);
Logger::log('poke: verb ' . $verb . ' contact ' . $contact_id, Logger::DEBUG);
$r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",

View file

@ -38,7 +38,7 @@ function profile_init(App $a)
if (DBA::isResult($r)) {
$a->internalRedirect('profile/' . $r[0]['nickname']);
} else {
Logger::log('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG);
Logger::log('profile error: mod_profile ' . $a->query_string, Logger::DEBUG);
notice(L10n::t('Requested profile is not available.') . EOL);
$a->error = 404;
return;

View file

@ -41,7 +41,7 @@ function pubsub_init(App $a)
$hub_verify = notags(trim(defaults($_GET, 'hub_verify_token', '')));
Logger::log('Subscription from ' . $_SERVER['REMOTE_ADDR'] . ' Mode: ' . $hub_mode . ' Nick: ' . $nick);
Logger::log('Data: ' . print_r($_GET,true), LOGGER_DATA);
Logger::log('Data: ' . print_r($_GET,true), Logger::DATA);
$subscribe = (($hub_mode === 'subscribe') ? 1 : 0);
@ -89,7 +89,7 @@ function pubsub_post(App $a)
$xml = file_get_contents('php://input');
Logger::log('Feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $a->cmd . ' with user-agent: ' . $_SERVER['HTTP_USER_AGENT']);
Logger::log('Data: ' . $xml, LOGGER_DATA);
Logger::log('Data: ' . $xml, Logger::DATA);
$nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : '');
$contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0 );

View file

@ -42,7 +42,7 @@ function receive_post(App $a)
// It is an application/x-www-form-urlencoded
Logger::log('mod-diaspora: receiving post', LOGGER_DEBUG);
Logger::log('mod-diaspora: receiving post', Logger::DEBUG);
if (empty($_POST['xml'])) {
$postdata = file_get_contents("php://input");
@ -50,29 +50,29 @@ function receive_post(App $a)
System::httpExit(500);
}
Logger::log('mod-diaspora: message is in the new format', LOGGER_DEBUG);
Logger::log('mod-diaspora: message is in the new format', Logger::DEBUG);
$msg = Diaspora::decodeRaw($importer, $postdata);
} else {
$xml = urldecode($_POST['xml']);
Logger::log('mod-diaspora: decode message in the old format', LOGGER_DEBUG);
Logger::log('mod-diaspora: decode message in the old format', Logger::DEBUG);
$msg = Diaspora::decode($importer, $xml);
if ($public && !$msg) {
Logger::log('mod-diaspora: decode message in the new format', LOGGER_DEBUG);
Logger::log('mod-diaspora: decode message in the new format', Logger::DEBUG);
$msg = Diaspora::decodeRaw($importer, $xml);
}
}
Logger::log('mod-diaspora: decoded', LOGGER_DEBUG);
Logger::log('mod-diaspora: decoded', Logger::DEBUG);
Logger::log('mod-diaspora: decoded msg: ' . print_r($msg, true), LOGGER_DATA);
Logger::log('mod-diaspora: decoded msg: ' . print_r($msg, true), Logger::DATA);
if (!is_array($msg)) {
System::httpExit(500);
}
Logger::log('mod-diaspora: dispatching', LOGGER_DEBUG);
Logger::log('mod-diaspora: dispatching', Logger::DEBUG);
$ret = true;
if ($public) {

View file

@ -52,7 +52,7 @@ function redir_init(App $a) {
if (!empty($a->contact['id']) && $a->contact['id'] == $cid) {
// Local user is already authenticated.
$target_url = defaults($url, $contact_url);
Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, LOGGER_DEBUG);
Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, Logger::DEBUG);
$a->redirect($target_url);
}
}
@ -73,7 +73,7 @@ function redir_init(App $a) {
if ($v['uid'] == $_SESSION['visitor_visiting'] && $v['cid'] == $_SESSION['visitor_id']) {
// Remote user is already authenticated.
$target_url = defaults($url, $contact_url);
Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, LOGGER_DEBUG);
Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, Logger::DEBUG);
$a->redirect($target_url);
}
}
@ -99,7 +99,7 @@ function redir_init(App $a) {
'sec' => $sec, 'expire' => time() + 45];
DBA::insert('profile_check', $fields);
Logger::log('mod_redir: ' . $contact['name'] . ' ' . $sec, LOGGER_DEBUG);
Logger::log('mod_redir: ' . $contact['name'] . ' ' . $sec, Logger::DEBUG);
$dest = (!empty($url) ? '&destination_url=' . $url : '');
@ -121,7 +121,7 @@ function redir_init(App $a) {
$url .= $separator . 'zrl=' . urlencode($my_profile);
}
Logger::log('redirecting to ' . $url, LOGGER_DEBUG);
Logger::log('redirecting to ' . $url, Logger::DEBUG);
$a->redirect($url);
}

View file

@ -21,7 +21,7 @@ function salmon_post(App $a, $xml = '') {
$xml = file_get_contents('php://input');
}
Logger::log('new salmon ' . $xml, LOGGER_DATA);
Logger::log('new salmon ' . $xml, Logger::DATA);
$nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : '');
$mentions = (($a->argc > 2 && $a->argv[2] === 'mention') ? true : false);
@ -108,7 +108,7 @@ function salmon_post(App $a, $xml = '') {
$m = base64url_decode($key_info[1]);
$e = base64url_decode($key_info[2]);
Logger::log('key details: ' . print_r($key_info,true), LOGGER_DEBUG);
Logger::log('key details: ' . print_r($key_info,true), Logger::DEBUG);
$pubkey = Crypto::meToPem($m, $e);

View file

@ -205,7 +205,7 @@ function search_content(App $a) {
$pager = new Pager($a->query_string);
if ($tag) {
Logger::log("Start tag search for '".$search."'", LOGGER_DEBUG);
Logger::log("Start tag search for '".$search."'", Logger::DEBUG);
$condition = ["(`uid` = 0 OR (`uid` = ? AND NOT `global`))
AND `otype` = ? AND `type` = ? AND `term` = ?",
@ -228,7 +228,7 @@ function search_content(App $a) {
$r = [];
}
} else {
Logger::log("Start fulltext search for '".$search."'", LOGGER_DEBUG);
Logger::log("Start fulltext search for '".$search."'", Logger::DEBUG);
$condition = ["(`uid` = 0 OR (`uid` = ? AND NOT `global`))
AND `body` LIKE CONCAT('%',?,'%')",
@ -255,12 +255,12 @@ function search_content(App $a) {
'$title' => $title
]);
Logger::log("Start Conversation for '".$search."'", LOGGER_DEBUG);
Logger::log("Start Conversation for '".$search."'", Logger::DEBUG);
$o .= conversation($a, $r, $pager, 'search', false, false, 'commented', local_user());
$o .= $pager->renderMinimal(count($r));
Logger::log("Done '".$search."'", LOGGER_DEBUG);
Logger::log("Done '".$search."'", Logger::DEBUG);
return $o;
}

View file

@ -57,6 +57,6 @@ function statistics_json_init(App $a) {
header("Content-Type: application/json");
echo json_encode($statistics, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
Logger::log("statistics_init: printed " . print_r($statistics, true), LOGGER_DATA);
Logger::log("statistics_init: printed " . print_r($statistics, true), Logger::DATA);
killme();
}

View file

@ -20,7 +20,7 @@ use Friendica\Object\Image;
function wall_upload_post(App $a, $desktopmode = true)
{
Logger::log("wall upload: starting new upload", LOGGER_DEBUG);
Logger::log("wall upload: starting new upload", Logger::DEBUG);
$r_json = (x($_GET, 'response') && $_GET['response'] == 'json');
$album = (x($_GET, 'album') ? notags(trim($_GET['album'])) : '');
@ -188,7 +188,7 @@ function wall_upload_post(App $a, $desktopmode = true)
}
Logger::log("File upload src: " . $src . " - filename: " . $filename .
" - size: " . $filesize . " - type: " . $filetype, LOGGER_DEBUG);
" - size: " . $filesize . " - type: " . $filetype, Logger::DEBUG);
$maximagesize = Config::get('system', 'maximagesize');
@ -226,7 +226,7 @@ function wall_upload_post(App $a, $desktopmode = true)
}
if ($max_length > 0) {
$Image->scaleDown($max_length);
Logger::log("File upload: Scaling picture to new size " . $max_length, LOGGER_DEBUG);
Logger::log("File upload: Scaling picture to new size " . $max_length, Logger::DEBUG);
}
$width = $Image->getWidth();
@ -301,11 +301,11 @@ function wall_upload_post(App $a, $desktopmode = true)
echo json_encode(['picture' => $picture]);
killme();
}
Logger::log("upload done", LOGGER_DEBUG);
Logger::log("upload done", Logger::DEBUG);
return $picture;
}
Logger::log("upload done", LOGGER_DEBUG);
Logger::log("upload done", Logger::DEBUG);
if ($r_json) {
echo json_encode(['ok' => true]);