public override void Log(ServiceAPIDetailLogDefinition log) { if (log.Detail != null && log.Detail.Length > maxMessagesSizeInKbForLargeContentQueues) { var builder = new StringBuilder(maxMessagesSizeInKbForLargeContentQueues + TruncatedLogMessageSuffix.Length + 1); builder.Append(log.Detail, 0, maxMessagesSizeInKbForLargeContentQueues - TruncatedLogMessageSuffix.Length); builder.Append(TruncatedLogMessageSuffix); log.Detail = builder.ToString(); } SendLog(log); }
public static string StaticWrite(string id, DateTime instant, int tenantId, string message, string detail, string detailLabel) { var logDef = new ServiceAPIDetailLogDefinition { Id = id, Instant = instant, TenantId = tenantId, Message = message, Detail = detail, DetailLabel = detailLabel }; logDef.Write(); return(logDef.Id); }
public static void Log(ServiceAPIDetailLogDefinition log) { try { if (!ApplicationMonitoringEnabled) { return; } if (LoggerInstance != null) { LoggerInstance.Log(log); } else { EventLogger.WriteInfo(log.Message); } } catch (Exception e) { logthrottle.WriteErrorWithThrottle(EventLogger.WriteError, "Error sending log: " + e.ToString()); } }
public override void Log(ServiceAPIDetailLogDefinition log) { }
public abstract void Log(ServiceAPIDetailLogDefinition log);
public override void Log(ServiceAPIDetailLogDefinition log) { Log(log, LogType.SrvAPI_Detail); }