Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Logger contract for the CSV report export pipeline.
4 *
5 * @package automattic/jetpack-premium-analytics
6 */
7
8declare( strict_types=1 );
9
10namespace Automattic\Jetpack\PremiumAnalytics\Reports\Export\Logging;
11
12defined( 'ABSPATH' ) || exit;
13
14use Throwable;
15
16/**
17 * Logger contract for the report-export subsystem.
18 *
19 * @since 0.1.0
20 */
21interface Logger_Interface {
22    /**
23     * Log an exception.
24     *
25     * @param Throwable $exception The exception to log.
26     * @param string    $method    The method where the exception occurred.
27     */
28    public function log_exception( Throwable $exception, string $method ): void;
29
30    /**
31     * Log an error.
32     *
33     * @param string $message The error message.
34     * @param string $method  The method where the error occurred.
35     */
36    public function log_error( string $message, string $method ): void;
37
38    /**
39     * Log a generic note.
40     *
41     * @param string $message The note to log.
42     * @param string $method  The method where the note occurred.
43     */
44    public function log_message( string $message, string $method ): void;
45
46    /**
47     * Log a JSON response.
48     *
49     * @param mixed  $response The response to log.
50     * @param string $method   The method where the response occurred.
51     */
52    public function log_response( $response, string $method ): void;
53}