public PerformanceTracker(string name, string userId, string username, string location, string product, string layer) { _stopwatch = Stopwatch.StartNew(); _logDetails = new SLogDetails() { Message = name, UserId = userId, Username = username, Product = product, Layer = layer, Location = location, HostName = Environment.MachineName }; var beginTime = DateTime.UtcNow; _logDetails.AdditionalInfo = new Dictionary <string, object>() { { "Started", beginTime.ToString(CultureInfo.InvariantCulture) } }; }
public static void WriteDiagnostic(SLogDetails diagnosticLogDetails) { _diagnosticLogger.Write(LogEventLevel.Information, "{@SLogDetails}", diagnosticLogDetails); }
public static void WriteUsage(SLogDetails usageLogDetails) { _usageLogger.Write(LogEventLevel.Information, "{@SLogDetails}", usageLogDetails); }
public static void WriteError(SLogDetails errorLogDetails) { _errorLogger.Write(LogEventLevel.Error, "{@SLogDetails}", errorLogDetails); }
public static void WritePerformance(SLogDetails performanceLogDetails) { _performanceLogger.Write(LogEventLevel.Information, "{@SLogDetails}", performanceLogDetails); }