<?php
/**
 * Logger interface.
 *
 * @package Awesomemotive\Rewardswp\Interfaces
 * @since 1.1.0
 */

namespace Awesomemotive\Rewardswp\Interfaces;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Defines the logging contract for RewardsWP.
 *
 * @since 1.1.0
 */
interface LoggerInterface {
	/**
	 * Log a message at a given level.
	 *
	 * @since 1.1.0
	 *
	 * @param string $level   Log level (debug, info, warning, error, etc).
	 * @param string $message Log message.
	 * @param array  $context Contextual data to interpolate into the message.
	 */
	public function log( string $level, string $message, array $context = [] ): void;

	/**
	 * System is unusable.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function emergency( string $message, array $context = [] ): void;

	/**
	 * Action must be taken immediately.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function alert( string $message, array $context = [] ): void;

	/**
	 * Critical conditions.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function critical( string $message, array $context = [] ): void;

	/**
	 * Runtime errors that do not require immediate action.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function error( string $message, array $context = [] ): void;

	/**
	 * Exceptional occurrences that are not errors.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function warning( string $message, array $context = [] ): void;

	/**
	 * Normal but significant events.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function notice( string $message, array $context = [] ): void;

	/**
	 * Interesting events.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function info( string $message, array $context = [] ): void;

	/**
	 * Detailed debug information.
	 *
	 * @since 1.1.0
	 *
	 * @param string $message Log message.
	 * @param array  $context Contextual data.
	 */
	public function debug( string $message, array $context = [] ): void;
}
