C# Класс Nop.Services.Logging.DefaultLogger

Default logger
Наследование: ILogger
Показать файл Открыть проект

Открытые методы

Метод Описание
ClearLog ( ) : void

Clears a log

DefaultLogger ( IRepository logRepository, IWebHelper webHelper, IDbContext dbContext, IDataProvider dataProvider, CommonSettings commonSettings ) : System

Ctor

DeleteLog ( Log log ) : void

Deletes a log item

GetAllLogs ( System.DateTime fromUtc, System.DateTime toUtc, string message, LogLevel logLevel, int pageIndex, int pageSize ) : IPagedList

Gets all log items

GetLogById ( int logId ) : Log

Gets a log item

GetLogByIds ( int logIds ) : IList

Get log items by identifiers

InsertLog ( LogLevel logLevel, string shortMessage, string fullMessage = "", Customer customer = null ) : Log

Inserts a log item

IsEnabled ( LogLevel level ) : bool

Determines whether a log level is enabled

Описание методов

ClearLog() публичный Метод

Clears a log
public ClearLog ( ) : void
Результат void

DefaultLogger() публичный Метод

Ctor
public DefaultLogger ( IRepository logRepository, IWebHelper webHelper, IDbContext dbContext, IDataProvider dataProvider, CommonSettings commonSettings ) : System
logRepository IRepository Log repository
webHelper IWebHelper Web helper
dbContext IDbContext DB context
dataProvider IDataProvider WeData provider
commonSettings Nop.Core.Domain.Common.CommonSettings Common settings
Результат System

DeleteLog() публичный Метод

Deletes a log item
public DeleteLog ( Log log ) : void
log Log Log item
Результат void

GetAllLogs() публичный Метод

Gets all log items
public GetAllLogs ( System.DateTime fromUtc, System.DateTime toUtc, string message, LogLevel logLevel, int pageIndex, int pageSize ) : IPagedList
fromUtc System.DateTime Log item creation from; null to load all records
toUtc System.DateTime Log item creation to; null to load all records
message string Message
logLevel LogLevel Log level; null to load all records
pageIndex int Page index
pageSize int Page size
Результат IPagedList

GetLogById() публичный Метод

Gets a log item
public GetLogById ( int logId ) : Log
logId int Log item identifier
Результат Log

GetLogByIds() публичный Метод

Get log items by identifiers
public GetLogByIds ( int logIds ) : IList
logIds int Log item identifiers
Результат IList

InsertLog() публичный Метод

Inserts a log item
public InsertLog ( LogLevel logLevel, string shortMessage, string fullMessage = "", Customer customer = null ) : Log
logLevel LogLevel Log level
shortMessage string The short message
fullMessage string The full message
customer Nop.Core.Domain.Customers.Customer The customer to associate log record with
Результат Log

IsEnabled() публичный Метод

Determines whether a log level is enabled
public IsEnabled ( LogLevel level ) : bool
level LogLevel Log level
Результат bool