 | LoggerCategory Enumeration |
The different categories used for the logging component in HandlebarsViewEngine. These are the only ones (currently) used by it.
Namespace: HandlebarsDotNet.MvcAssembly: HandlebarsDotNet.Mvc (in HandlebarsDotNet.Mvc.dll) Version: 1.0.0-beta
Syntaxpublic enum LoggerCategory
Public Enumeration LoggerCategory
public enum class LoggerCategory
Members
| Member name | Value | Description |
---|
| Api | 0 |
Category Api is typically used with Trace(LoggerCategory, FuncString) just when a method has been entered or about to leave it.
|
| Compile | 1 |
Category Compile is used related to compiling a view, layout, etc.
|
| Cache | 2 |
Category Cache is used when something related to the caching is logged.
|
Examples
This is what the
ClearCache(ControllerContext) method looks like (at one point in time at least):
public virtual void ClearCache(ControllerContext controllerContext)
{
if(controllerContext == null)
throw new ArgumentNullException("controllerContext");
Logger.Trace(LoggerCategory.Api, () => "ClearCache() called.");
var globalCacheKey = GetCacheKey(controllerContext, STR_GLOBAL);
Logger.Log(LoggerCategory.Cache, () => "Clearing the cache.");
Cache.Remove(globalCacheKey);
}
See Also