Ejemplo n.º 1
0
        protected override void OnWrite(int severity, string text)
        {
            DateTimeOffset dtoNow = DateTimeOffset.Now;
            var            props  = new NamedValueSet();

            props.Set("Severity", severity);
            var data = new DebugLogEvent
            {
                Created   = dtoNow.ToString("o"),
                Message   = text,
                ProcessId = ProcessId,
                SeqNumber = Interlocked.Increment(ref _seqNumber),
                Severity  = severity,
                ApplName  = _client.ClientInfo.ApplName,
                HostName  = _client.ClientInfo.HostName,
                UserName  = _client.ClientInfo.UserName,
                OrigEnv   = EnvHelper.EnvName(_client.ClientInfo.ConfigEnv)
            };

            _client.SaveDebug(data, data.ItemName, props);
        }
Ejemplo n.º 2
0
 private static string SiteKey(EnvId env, string siteName)
 {
     return(EnvHelper.EnvName(env) + siteName);
 }