Logger::info(API_LOG_PREFIX . 'username {username}', ['module' => 'api', 'action' => 'call', 'username' => $a->user['username'], 'duration' => round($duration, 2)]);
- $a->getProfiler()->saveLog($a->getLogger(), API_LOG_PREFIX . 'performance');
+ $a->getProfiler()->saveLog(DI::logger(), API_LOG_PREFIX . 'performance');
if (false === $return) {
/*
return $this->config->getCache()->get('system', 'basepath');
}
- /**
- * The Logger of this app
- *
- * @return LoggerInterface
- */
- public function getLogger()
- {
- return $this->logger;
- }
-
/**
* The profiler of this app
*
* The week ensures that sessions will expire after some inactivity.
*/;
if ($this->session->get('remember')) {
- $a->getLogger()->info('Injecting cookie for remembered user ' . $user_record['nickname']);
+ $this->logger->info('Injecting cookie for remembered user ' . $user_record['nickname']);
$this->cookie->set($user_record['uid'], $user_record['password'], $user_record['prvkey']);
$this->session->remove('remember');
}
Logger::info('Process done.', ['priority' => $queue["priority"], 'id' => $queue["id"], 'duration' => round($duration, 3)]);
- $a->getProfiler()->saveLog($a->getLogger(), "ID " . $queue["id"] . ": " . $funcname);
+ $a->getProfiler()->saveLog(DI::logger(), "ID " . $queue["id"] . ": " . $funcname);
$cooldown = Config::get("system", "worker_cooldown", 0);
$args = ['no_cron' => !$do_cron];
$a = get_app();
- $process = new Core\Process($a->getLogger(), $a->getMode(), DI::config(), $a->getBasePath());
+ $process = new Core\Process(DI::logger(), $a->getMode(), DI::config(), $a->getBasePath());
$process->run($command, $args);
// after spawning we have to remove the flag.
*/
public static function update()
{
- $app = DI::app();
$config = DI::config();
- $logger = $app->getLogger();
+ $logger = DI::logger();
// If the addon 'statistics_json' is enabled then disable it and activate nodeinfo.
if (Addon::isEnabled('statistics_json')) {
$currBasepath = DI::config()->get('system', 'basepath');
if ($confBasepath !== $currBasepath || !is_dir($currBasepath)) {
if (is_dir($confBasepath) && Config::set('system', 'basepath', $confBasepath)) {
- $a->getLogger()->info('Friendica\'s system.basepath was updated successfully.', [
+ DI::logger()->info('Friendica\'s system.basepath was updated successfully.', [
'from' => $currBasepath,
'to' => $confBasepath,
]);
$currBasepath,
$confBasepath);
} elseif (!is_dir($currBasepath)) {
- $a->getLogger()->alert('Friendica\'s system.basepath is wrong.', [
+ DI::logger()->alert('Friendica\'s system.basepath is wrong.', [
'from' => $currBasepath,
'to' => $confBasepath,
]);
$currBasepath,
$confBasepath);
} else {
- $a->getLogger()->alert('Friendica\'s system.basepath is wrong.', [
+ DI::logger()->alert('Friendica\'s system.basepath is wrong.', [
'from' => $currBasepath,
'to' => $confBasepath,
]);
}
$app = DI::app();
- $logger = $app->getLogger();
+ $logger = DI::logger();
$item_id = (($app->argc > 1) ? intval($app->argv[1]) : 0);
public static function rawContent(array $parameters = [])
{
$a = DI::app();
- $logger = $a->getLogger();
+ $logger = DI::logger();
$term = XML::unescape(trim($_GET['term'] ?? ''));
// @TODO: Replace with parameter from router
public static function rawContent(array $parameters = [])
{
$config = DI::config();
- $logger = DI::app()->getLogger();
+ $logger = DI::logger();
$registration_open =
intval($config->get('config', 'register_policy')) !== Register::CLOSED