LogManager.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\core;
12 
13 ini_set('html_errors', false);
14 
15 /**
16  * LogManager is used to retrieve Logger instances.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 class LogManager {
21 
22  private static $logger = null;
23 
24  /**
25  * Configure the manager.
26  * @param $logger Logger instance
27  */
28  public static function configure(Logger $logger) {
29  self::$logger = $logger;
30  }
31 
32  /**
33  * Get the logger with the given name
34  * @param $name The logger name
35  * @return Logger
36  */
37  public static function getLogger($name) {
38  return self::$logger->getLogger($name);
39  }
40 }
41 ?>
static configure(Logger $logger)
Configure the manager.
Definition: LogManager.php:28
Interface for logger implementations.
Definition: Logger.php:18
static getLogger($name)
Get the logger with the given name.
Definition: LogManager.php:37
Core classes.
Definition: namespaces.php:11
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:20