Skip to content
Snippets Groups Projects
Commit 8431c091 authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

FIX #22107 TIME 0:10 add return for 'LogsController::getLogType' and add description

parent ebe9fcdd
No related branches found
No related tags found
No related merge requests found
......@@ -529,11 +529,11 @@ class AuthenticationController
if (!empty($logTypeInfo['errors'])) {
return ['errors' => 'Cas configuration missing : ' . $logTypeInfo['errors']];
}
}
if ($logTypeInfo['level'] == 'DEBUG') {
\phpCAS::setVerbose(true);
}
\phpCAS::setVerbose(true);
}
\phpCAS::client(constant($version), $hostname, (int)$port, $uri, $version != 'CAS_VERSION_3_0');
......@@ -577,8 +577,8 @@ class AuthenticationController
}
if ($logTypeInfo['level'] == 'DEBUG') {
\phpCAS::setVerbose(true);
}
\phpCAS::setVerbose(true);
}
\phpCAS::client(constant($version), $hostname, (int)$port, $uri, $version != 'CAS_VERSION_3_0');
if (!empty($certificate)) {
......
......@@ -57,13 +57,18 @@ class LogsController
return $logger;
}
public static function getLogType($logType)
/**
* @description Get log config by type
* @param string $logType logFonctionnel | logTechnique | queries
* @return array
*/
public static function getLogType(string $logType)
{
$logConfig = LogsController::getLogConfig();
if (empty($logConfig[$logType])) {
return ['code' => 400, 'errors' => "Log config of type '$logType' not found!"];
}
return $logConfig[$logType];
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment