C# Class Elmah.XmlFileErrorLog

An ErrorLog implementation that uses XML files stored on disk as its backing store.
Inheritance: Elmah.ErrorLog
Afficher le fichier Open project: elmah/Elmah Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
IsUserFile ( FileAttributes attributes ) : bool
LoadErrorLogEntry ( string path ) : ErrorLogEntry
MapPath ( string path ) : string

Method Details

GetError() public méthode

Returns the specified error from the filesystem, or throws an exception if it does not exist.
public GetError ( string id ) : ErrorLogEntry
id string
Résultat ErrorLogEntry

GetErrors() public méthode

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
Résultat int

Log() public méthode

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
Résultat string

XmlFileErrorLog() public méthode

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
Résultat System

XmlFileErrorLog() public méthode

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
Résultat System