Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

ILogger.cs

using Nop.Core;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Logging;

namespace Nop.Services.Logging;

/// 
/// Logger interface
/// 
public partial interface ILogger
{
    /// 
    /// Determines whether a log level is enabled
    /// 
    /// Log level
    /// Result
    bool IsEnabled(LogLevel level);

    /// 
    /// Deletes a log item
    /// 
    /// Log item
    /// A task that represents the asynchronous operation
    Task DeleteLogAsync(Log log);

    /// 
    /// Deletes a log items
    /// 
    /// Log items
    /// A task that represents the asynchronous operation
    Task DeleteLogsAsync(IList logs);

    /// 
    /// Clears a log
    /// 
    /// The date that sets the restriction on deleting records. Leave null to remove all records
    /// A task that represents the asynchronous operation
    Task ClearLogAsync(DateTime? olderThan = null);

    /// 
    /// Gets all log items
    /// 
    /// Log item creation from; null to load all records
    /// Log item creation to; null to load all records
    /// Message
    /// Log level; null to load all records
    /// Page index
    /// Page size
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the log item items
    /// 
    Task> GetAllLogsAsync(DateTime? fromUtc = null, DateTime? toUtc = null,
        string message = "", LogLevel? logLevel = null,
        int pageIndex = 0, int pageSize = int.MaxValue);

    /// 
    /// Gets a log item
    /// 
    /// Log item identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the log item
    /// 
    Task GetLogByIdAsync(int logId);

    /// 
    /// Get log items by identifiers
    /// 
    /// Log item identifiers
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the log items
    /// 
    Task> GetLogByIdsAsync(int[] logIds);

    /// 
    /// Inserts a log item
    /// 
    /// Log level
    /// The short message
    /// The full message
    /// The customer to associate log record with
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains a log item
    /// 
    Task InsertLogAsync(LogLevel logLevel, string shortMessage, string fullMessage = "", Customer customer = null);

    /// 
    /// Inserts a log item
    /// 
    /// Log level
    /// The short message
    /// The full message
    /// The customer to associate log record with
    /// 
    /// Log item
    /// 
    Log InsertLog(LogLevel logLevel, string shortMessage, string fullMessage = "", Customer customer = null);

    /// 
    /// Information
    /// 
    /// Message
    /// Exception
    /// Customer
    /// A task that represents the asynchronous operation
    Task InformationAsync(string message, Exception exception = null, Customer customer = null);

    /// 
    /// Information
    /// 
    /// Message
    /// Exception
    /// Customer
    void Information(string message, Exception exception = null, Customer customer = null);

    /// 
    /// Warning
    /// 
    /// Message
    /// Exception
    /// Customer
    /// A task that represents the asynchronous operation
    Task WarningAsync(string message, Exception exception = null, Customer customer = null);

    /// 
    /// Warning
    /// 
    /// Message
    /// Exception
    /// Customer
    void Warning(string message, Exception exception = null, Customer customer = null);

    /// 
    /// Error
    /// 
    /// Message
    /// Exception
    /// Customer
    /// A task that represents the asynchronous operation
    Task ErrorAsync(string message, Exception exception = null, Customer customer = null);

    /// 
    /// Error
    /// 
    /// Message
    /// Exception
    /// Customer
    void Error(string message, Exception exception = null, Customer customer = null);
}