• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 7004843404

27 Nov 2023 11:48AM UTC coverage: 49.206% (-0.03%) from 49.232%
7004843404

push

github

web-flow
Merge pull request #20858 from Yoast/improve-copy-in-the-ftc-57

15305 of 31104 relevant lines covered (49.21%)

4.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/loggers/logger.php
1
<?php
2

3
namespace Yoast\WP\SEO\Loggers;
4

5
use YoastSEO_Vendor\Psr\Log\LoggerInterface;
6
use YoastSEO_Vendor\Psr\Log\LoggerTrait;
7
use YoastSEO_Vendor\Psr\Log\NullLogger;
8

9
/**
10
 * Our logger class.
11
 */
12
class Logger implements LoggerInterface {
13

14
        use LoggerTrait;
15

16
        /**
17
         * The logger object.
18
         *
19
         * @var LoggerInterface
20
         */
21
        protected $wrapped_logger;
22

23
        /**
24
         * Logger constructor.
25
         */
26
        public function __construct() {
×
27
                $this->wrapped_logger = new NullLogger();
×
28

29
                /**
30
                 * Gives the possibility to set override the logger interface.
31
                 *
32
                 * @api \YoastSEO_Vendor\Psr\Log\LoggerInterface $logger Instance of NullLogger.
33
                 *
34
                 * @return LoggerInterface The logger object.
35
                 */
36
                $this->wrapped_logger = \apply_filters( 'wpseo_logger', $this->wrapped_logger );
×
37
        }
38

39
        /**
40
         * Logs with an arbitrary level.
41
         *
42
         * @param mixed  $level   The log level.
43
         * @param string $message The log message.
44
         * @param array  $context The log context.
45
         *
46
         * @return void
47
         */
48
        public function log( $level, $message, array $context = [] ) {
×
49
                $this->wrapped_logger->log( $level, $message, $context );
×
50
        }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc