blob: d6f5191cc715c98cc1814a9af9cfe0471c3bda9a [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Adldap\Log;
4
5use Psr\Log\LoggerInterface;
6
7trait LogsInformation
8{
9 /**
10 * The logger instance.
11 *
12 * @var LoggerInterface|null
13 */
14 protected static $logger;
15
16 /**
17 * Get the logger instance.
18 *
19 * @return LoggerInterface|null
20 */
21 public static function getLogger()
22 {
23 return static::$logger;
24 }
25
26 /**
27 * Set the logger instance.
28 *
29 * @param LoggerInterface $logger
30 *
31 * @return void
32 */
33 public static function setLogger(LoggerInterface $logger)
34 {
35 static::$logger = $logger;
36 }
37
38 /**
39 * Unset the logger instance.
40 *
41 * @return void
42 */
43 public static function unsetLogger()
44 {
45 static::$logger = null;
46 }
47}