2017-01-11 08:39:15 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
|
|
|
|
|
namespace Teknik.Configuration
|
|
|
|
|
{
|
|
|
|
|
public class LoggingConfig
|
|
|
|
|
{
|
|
|
|
|
public bool Enabled { get; set; }
|
|
|
|
|
|
|
|
|
|
public string OutputDirectory { get; set; }
|
|
|
|
|
|
|
|
|
|
public string LogLevel { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool RotateLogs { get; set; }
|
|
|
|
|
|
|
|
|
|
public long MaxSize { get; set; }
|
|
|
|
|
|
|
|
|
|
public int MaxCount { get; set; }
|
|
|
|
|
|
2017-01-18 22:04:11 +01:00
|
|
|
|
public bool SendEmail { get; set; }
|
|
|
|
|
|
|
|
|
|
public string EmailLevel { get; set; }
|
|
|
|
|
|
|
|
|
|
public EmailAccount SenderAccount { get; set; }
|
|
|
|
|
|
|
|
|
|
public string RecipientEmailAddress { get; set; }
|
|
|
|
|
|
2017-01-11 08:39:15 +01:00
|
|
|
|
public LoggingConfig()
|
|
|
|
|
{
|
|
|
|
|
SetDefaults();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetDefaults()
|
|
|
|
|
{
|
|
|
|
|
Enabled = true;
|
|
|
|
|
OutputDirectory = string.Empty;
|
|
|
|
|
LogLevel = "Info";
|
|
|
|
|
RotateLogs = false;
|
|
|
|
|
MaxSize = -1;
|
|
|
|
|
MaxCount = -1;
|
2017-01-18 22:04:11 +01:00
|
|
|
|
SendEmail = false;
|
|
|
|
|
EmailLevel = "Error";
|
|
|
|
|
SenderAccount = new EmailAccount();
|
|
|
|
|
RecipientEmailAddress = string.Empty;
|
2017-01-11 08:39:15 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|