C# Class Nop.Services.Logging.DefaultLogger

Default logger
Inheritance: ILogger
ファイルを表示 Open project: emilianionascu/NopCommerce

Public Methods

Method Description
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

Method Details

ClearLog() public method

Clears a log
public ClearLog ( ) : void
return void

DefaultLogger() public method

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
return System

DeleteLog() public method

Deletes a log item
public DeleteLog ( Log log ) : void
log Log Log item
return void

GetAllLogs() public method

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
return IPagedList

GetLogById() public method

Gets a log item
public GetLogById ( int logId ) : Log
logId int Log item identifier
return Log

GetLogByIds() public method

Get log items by identifiers
public GetLogByIds ( int logIds ) : IList
logIds int Log item identifiers
return IList

InsertLog() public method

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
return Log

IsEnabled() public method

Determines whether a log level is enabled
public IsEnabled ( LogLevel level ) : bool
level LogLevel Log level
return bool