Changeset 796 for trunk


Ignore:
Timestamp:
Jul 13, 2023 3:13:57 AM (10 months ago)
Author:
anonymous
Message:

minor changes

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r790 r796  
    446446                    }
    447447                } else {
    448                     $this->logMsg(sprintf('DB auth file not found: %s', $this->getParam('db_auth_file')), LOG_ERR, __FILE__, __LINE__);
     448                    $missing_db_params = [];
     449                    foreach (['db_auth_file', 'db_server', 'db_name', 'db_user', 'db_pass'] as $required_db_param) {
     450                        if (!$this->getParam($required_db_param)) {
     451                            $missing_db_params[] = $required_db_param;
     452                        }
     453                    }
     454                    $this->logMsg(sprintf('DB credentials or %s not found. Missing parameters: %s', $this->getParam('db_auth_file'), join(', ', $missing_db_params)), LOG_ERR, __FILE__, __LINE__);
    449455                }
    450456            }
  • trunk/lib/Utilities.inc.php

    r793 r796  
    17361736    $headers = get_headers($url, 1, $context);
    17371737    $app =& \App::getInstance();
    1738     $app->logMsg(getDump($headers, true, SC_DUMP_JSON), LOG_DEBUG, __FILE__, __LINE__);
     1738    $app->logMsg(sprintf('HTTP response headers for %s %s: %s', strtoupper($method), $url, getDump($headers, true, SC_DUMP_JSON)), LOG_DEBUG, __FILE__, __LINE__);
    17391739    if (empty($headers)) {
    17401740        return false;
     
    17451745    $final_http_status_key = end($http_status_keys); // E.g., `1`
    17461746    $final_http_status = $headers[$final_http_status_key]; // E.g., `HTTP/1.1 200 OK`
    1747     $app->logMsg(sprintf('$final_http_status: %s', $final_http_status), LOG_DEBUG, __FILE__, __LINE__);
     1747    $app->logMsg(sprintf('Last HTTP status code: %s', $final_http_status), LOG_DEBUG, __FILE__, __LINE__);
    17481748    if ($headers && preg_match(sprintf('/\b(%s)\b/', join('|', $valid_response_codes)), $final_http_status)) {
    17491749        $headers = array_change_key_case($headers, CASE_LOWER);
Note: See TracChangeset for help on using the changeset viewer.