LogManager.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2015 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 /**
14  * LogManager is used to retrieve Logger instances.
15  *
16  * @author ingo herwig <ingo@wemove.com>
17  */
18 class LogManager {
19 
20  private static $_logger = null;
21 
22  /**
23  * Configure the manager.
24  * @param $logger Logger instance
25  */
26  public static function configure(Logger $logger) {
27  self::$_logger = $logger;
28  }
29 
30  /**
31  * Get the logger with the given name
32  * @param $name The logger name
33  * @return Logger
34  */
35  public static function getLogger($name) {
36  return self::$_logger->getLogger($name);
37  }
38 }
39 ?>
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:18
static getLogger($name)
Get the logger with the given name.
Definition: LogManager.php:35
static configure(Logger $logger)
Configure the manager.
Definition: LogManager.php:26
Core classes.
Definition: namespaces.php:11