Files
Umbraco-CMS/src/UmbracoExamine.Azure/UmbracoAzureLogService.cs
2013-01-07 03:06:33 +03:00

30 lines
967 B
C#

using Examine;
using Examine.Azure;
using UmbracoExamine.DataServices;
namespace UmbracoExamine.Azure
{
public class UmbracoAzureLogService : ILogService
{
public string ProviderName { get; set; }
public void AddErrorLog(int nodeId, string msg)
{
AzureExtensions.LogExceptionFile(ProviderName, new IndexingErrorEventArgs(msg, nodeId, null));
}
public void AddInfoLog(int nodeId, string msg)
{
if (LogLevel == LoggingLevel.Verbose)
AzureExtensions.LogMessageFile("[UmbracoExamine] (" + ProviderName + ")" + msg + ". " + nodeId);
}
public void AddVerboseLog(int nodeId, string msg)
{
if (LogLevel == LoggingLevel.Verbose)
AzureExtensions.LogMessageFile("[UmbracoExamine] (" + ProviderName + ")" + msg + ". " + nodeId);
}
public LoggingLevel LogLevel { get; set; }
}
}