Class ModelStateFormatterLogger
- Namespace
- System.Web.Http.Validation
- Assembly
- System.Web.Http.dll
This System.Net.Http.Formatting.IFormatterLogger logs formatter errors to the provided ModelStateDictionary.
public class ModelStateFormatterLogger : IFormatterLogger
- Inheritance
-
ModelStateFormatterLogger
- Implements
-
IFormatterLogger
- Inherited Members
Constructors
ModelStateFormatterLogger(ModelStateDictionary, string)
Initializes a new instance of the ModelStateFormatterLogger class.
public ModelStateFormatterLogger(ModelStateDictionary modelState, string prefix)
Parameters
modelStateModelStateDictionaryThe model state.
prefixstringThe prefix.
Methods
LogError(string, Exception)
Logs the specified model error.
public void LogError(string errorPath, Exception exception)
Parameters
LogError(string, string)
Logs the specified model error.
public void LogError(string errorPath, string errorMessage)