C# Класс Elmah.XmlFileErrorLog

An ErrorLog implementation that uses XML files stored on disk as its backing store.
Наследование: Elmah.ErrorLog
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetError ( string id ) : ErrorLogEntry

Returns the specified error from the filesystem, or throws an exception if it does not exist.

GetErrors ( int pageIndex, int pageSize, ICollection errorEntryList ) : int

Returns a page of errors from the folder in descending order of logged time as defined by the sortable filenames.

Log ( Error error ) : string

Logs an error to the database.

Logs an error as a single XML file stored in a folder. XML files are named with a sortable date and a unique identifier. Currently the XML files are stored indefinately. As they are stored as files, they may be managed using standard scheduled jobs.

XmlFileErrorLog ( System.Collections.IDictionary config ) : System

Initializes a new instance of the XmlFileErrorLog class using a dictionary of configured settings.

XmlFileErrorLog ( string logPath ) : System

Initializes a new instance of the XmlFileErrorLog class to use a specific path to store/load XML files.

Приватные методы

Метод Описание
IsUserFile ( FileAttributes attributes ) : bool
LoadErrorLogEntry ( string path ) : ErrorLogEntry
MapPath ( string path ) : string

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

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

Returns the specified error from the filesystem, or throws an exception if it does not exist.
public GetError ( string id ) : ErrorLogEntry
id string
Результат ErrorLogEntry

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

Returns a page of errors from the folder in descending order of logged time as defined by the sortable filenames.
public GetErrors ( int pageIndex, int pageSize, ICollection errorEntryList ) : int
pageIndex int
pageSize int
errorEntryList ICollection
Результат int

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

Logs an error to the database.
Logs an error as a single XML file stored in a folder. XML files are named with a sortable date and a unique identifier. Currently the XML files are stored indefinately. As they are stored as files, they may be managed using standard scheduled jobs.
public Log ( Error error ) : string
error Error
Результат string

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

Initializes a new instance of the XmlFileErrorLog class using a dictionary of configured settings.
public XmlFileErrorLog ( System.Collections.IDictionary config ) : System
config System.Collections.IDictionary
Результат System

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

Initializes a new instance of the XmlFileErrorLog class to use a specific path to store/load XML files.
public XmlFileErrorLog ( string logPath ) : System
logPath string
Результат System