public override void Log(IntDetailLogDefinition 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 override void Log(IntDetailLogDefinition log) { if (log.Message != null) { // Ensure the limits here to avoid hitting any queues limits, but the IntDetailLogDefinition should have it already sanitized log.Message = StringUtils.Left(log.Message, IntDetailLogDefinition.MAX_MESSAGE_SIZE); } if (log.Detail != null && log.Detail.Length > maxMessagesSizeInKbForLargeContentQueues) { var builder = new StringBuilder(maxMessagesSizeInKbForLargeContentQueues + TruncatedLogMessageSuffix.Length + 1); builder.Append(log.Detail, 0, maxMessagesSizeInKbForLargeContentQueues); builder.Append(TruncatedLogMessageSuffix); log.Detail = builder.ToString(); } Log(log, LogType.Int_Detail); }
public static void Log(IntDetailLogDefinition 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(IntDetailLogDefinition log) { }
public abstract void Log(IntDetailLogDefinition log);
public IntDetailLog(IntDetailLog obj) { log = new IntDetailLogDefinition(obj.Id, obj.Instant, obj.TenantId, obj.Message, obj.Detail, obj.DetailLabel); }
public IntDetailLog(string id, DateTime instant, int tenant_Id, string message, string detail, string detailLabel) { log = new IntDetailLogDefinition(id, instant, tenant_Id, message, detail, detailLabel); }
public IntDetailLog() { log = new IntDetailLogDefinition(); }
public static string StaticWrite(string id, DateTime instant, int tenant_Id, string message, string detail, string detailLabel) { return(IntDetailLogDefinition.StaticWrite(id, instant, tenant_Id, message, detail, detailLabel)); }