Use new log levels in admin log settings page
This commit is contained in:
parent
c897969589
commit
bfc0729752
|
@ -34,6 +34,7 @@ use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
|
use Psr\Log\LogLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the current theme for theme settings pages.
|
* Sets the current theme for theme settings pages.
|
||||||
|
@ -2497,7 +2498,7 @@ function admin_page_logs_post(App $a)
|
||||||
|
|
||||||
$logfile = (!empty($_POST['logfile']) ? Strings::escapeTags(trim($_POST['logfile'])) : '');
|
$logfile = (!empty($_POST['logfile']) ? Strings::escapeTags(trim($_POST['logfile'])) : '');
|
||||||
$debugging = !empty($_POST['debugging']);
|
$debugging = !empty($_POST['debugging']);
|
||||||
$loglevel = (!empty($_POST['loglevel']) ? intval(trim($_POST['loglevel'])) : 0);
|
$loglevel = defaults($_POST, 'loglevel', LogLevel::ERROR);
|
||||||
|
|
||||||
Config::set('system', 'logfile', $logfile);
|
Config::set('system', 'logfile', $logfile);
|
||||||
Config::set('system', 'debugging', $debugging);
|
Config::set('system', 'debugging', $debugging);
|
||||||
|
@ -2529,12 +2530,11 @@ function admin_page_logs_post(App $a)
|
||||||
function admin_page_logs(App $a)
|
function admin_page_logs(App $a)
|
||||||
{
|
{
|
||||||
$log_choices = [
|
$log_choices = [
|
||||||
Logger::WARNING => 'Warning',
|
LogLevel::ERROR => 'Error',
|
||||||
Logger::INFO => 'Info',
|
LogLevel::WARNING => 'Warning',
|
||||||
Logger::TRACE => 'Trace',
|
LogLevel::NOTICE => 'Notice',
|
||||||
Logger::DEBUG => 'Debug',
|
LogLevel::INFO => 'Info',
|
||||||
Logger::DATA => 'Data',
|
LogLevel::DEBUG => 'Debug',
|
||||||
Logger::ALL => 'All'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (ini_get('log_errors')) {
|
if (ini_get('log_errors')) {
|
||||||
|
|
Loading…
Reference in a new issue