use Friendica\Util\Network;
use Friendica\Util\Strings;
use Friendica\Util\Temporal;
+use Psr\Log\LogLevel;
/**
* Sets the current theme for theme settings pages.
$logfile = (!empty($_POST['logfile']) ? Strings::escapeTags(trim($_POST['logfile'])) : '');
$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', 'debugging', $debugging);
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'
+ LogLevel::ERROR => 'Error',
+ LogLevel::WARNING => 'Warning',
+ LogLevel::NOTICE => 'Notice',
+ LogLevel::INFO => 'Info',
+ LogLevel::DEBUG => 'Debug',
];
if (ini_get('log_errors')) {