<?php
/**
 * Logger handles persistence of email delivery data.
 *
 * @package MailDoctor
 */

namespace MailDoctor;

require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-config.php';
require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-mutators.php';
require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-query.php';
require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-report.php';
require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-maintenance.php';
require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-privacy.php';
require_once MAIL_DOCTOR_PATH . 'includes/core/modules/module-logger-utils.php';

use MailDoctor\Helpers\Settings;

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

/**
 * Logger service.
 */
class Logger {

	/**
	 * Cached active log attempts keyed by log ID.
	 *
	 * @var array<int, array<string, mixed>>
	 */
	protected static $active = array();

	/**
	 * Cron hook identifier for archiving routine.
	 */
	const ARCHIVE_CRON = 'mail_doctor_archive_logs';

	use Logger_Config_Trait;
	use Logger_Mutators_Trait;
	use Logger_Query_Trait;
	use Logger_Report_Trait;
	use Logger_Maintenance_Trait;
	use Logger_Privacy_Trait;
	use Logger_Utils_Trait;
}
