public GeneralLog(DateTime instant, string sessionId, int espaceId, int tenantId, int userId, string message, string messageType, string moduleName, string errorId) { string requestKey, actionName, entryPointName, clientIp; requestKey = actionName = entryPointName = clientIp = String.Empty; RequestTracer reqTracer = RuntimePlatformUtils.GetRequestTracer(); if (reqTracer != null) { requestKey = reqTracer.RequestKey; actionName = reqTracer.EntryActionName; entryPointName = reqTracer.EntryEndpointName; } clientIp = RuntimePlatformUtils.GetRequestSourceForLogging(); GetEspaceDetails(espaceId, userId, out string eSpaceName, out string applicationName, out ObjectKey applicationKey, out string username); log = new GeneralLogDefinition(instant, sessionId, espaceId, tenantId, userId, message, messageType, moduleName, errorId, requestKey, actionName, entryPointName, clientIp, eSpaceName, applicationName, applicationKey, username); }
public static void Log(GeneralLogDefinition log) { try { if (!ApplicationMonitoringEnabled) { return; } if (log.ModuleName == "ALARM") { EventLogger.WriteWarning(log.Message); } 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(GeneralLogDefinition log) { }
public GeneralLog(GeneralLog obj) { log = new GeneralLogDefinition(obj.Instant, obj.SessionId, obj.EspaceId, obj.TenantId, obj.UserId, obj.Message, obj.MessageType, obj.ModuleName, obj.ErrorId, obj.RequestKey, obj.ActionName, obj.EntrypointName, obj.ClientIP, obj.EspaceName, obj.ApplicationName, obj.ApplicationKey, obj.Username); }
public GeneralLog() { log = new GeneralLogDefinition(); }
public abstract void Log(GeneralLogDefinition log);
public override void Log(GeneralLogDefinition log) { Log(log, LogType.General); }