# packeta/2.3.1/src/Packetery/Core/Log/ILogger.php

Packeta, version 2.3.1. 48 lines.

- Page: https://pluginprobe.com/plugins/packeta/2.3.1/code/src/Packetery/Core/Log/ILogger.php
- Raw: https://pluginprobe.com/plugins/packeta/2.3.1/raw/src/Packetery/Core/Log/ILogger.php
- Modified: 2025-11-07T08:59:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/packeta/2.3.1/code/src/Packetery/Core/Log/ILogger.php#L10-L20`.

```php
<?php
/**
 * Interface ILogger
 *
 * @package Packetery\Log
 */

declare( strict_types=1 );

namespace Packetery\Core\Log;

/**
 * Interface ILogger
 *
 * @package Packetery\Log
 */
interface ILogger {
	/**
	 * Adds log record.
	 *
	 * @param Record $record Record.
	 * @return int|false The number of rows inserted, or false on error.
	 */
	public function add( Record $record );

	/**
	 * Get logs.
	 *
	 * @param int|null              $orderId Order ID.
	 * @param string|null           $action  Action.
	 * @param array<string, string> $sorting Sorting config.
	 * @param int                   $limit   Limit.
	 *
	 * @return iterable<Record>
	 */
	public function getRecords( ?int $orderId, ?string $action, array $sorting = [], int $limit = 100 ): iterable;

	/**
	 * Counts records.
	 *
	 * @param int|null    $orderId Order ID.
	 * @param string|null $action  Action.
	 *
	 * @return int
	 */
	public function countRecords( ?int $orderId = null, ?string $action = null ): int;
}

```
