private string CheckFile(LogLevel logLevel) { string fileName = string.Format("{0}_{1}", logLevel, LogFileName ?? DateTime.Today.ToString("yyyyMMdd")); string fileExtension = string.IsNullOrEmpty(LogExtension) ? ".log" : LogExtension.StartsWith('.') ? LogExtension : string.Format(".{0}", LogExtension); return(string.Format("{0}{1}", fileName, fileExtension)); }