public static void WriteDiagnostics(SLogDetail info) { var showDiagnostics = Convert.ToBoolean(ConfigurationManager.AppSettings.Get("EnableDiagnostics")); if (!showDiagnostics) { return; } _diagnosticLogger.Write(LogEventLevel.Information, "{@FlogDetail}", info); }
public PerfTracker(string name, string userId, string userName, string location, string product, string layer) { _watch = new Stopwatch(); _detail = new SLogDetail() { Message = name, UserId = userId, UserName = userName, Location = location, Product = product, Layer = layer, Hostname = Environment.MachineName }; var beginTime = DateTime.Now; _detail.AdditionalInfo = new Dictionary <string, object>() { { "Started", beginTime.ToString(CultureInfo.InvariantCulture) } }; }
public static void WriteUsage(SLogDetail info) { _usageLogger.Write(LogEventLevel.Information, "{@FlogDetail}", info); }
public static void WritePerformance(SLogDetail info) { _performanceLogger.Write(LogEventLevel.Information, "{@FlogDetail}", info); }
public static void WriteError(SLogDetail info) { _errorLogger.Write(LogEventLevel.Information, "{@FlogDetail}", info); }