public void AfterCall(
            string operationName, object[] outputs,
            object returnValue, object correlationState
            )
        {
            var logEntry = correlationState as FlogDetail;

            if (logEntry == null)
            {
                return;
            }
            logEntry.ElapsedMilliseconds =
                (DateTime.Now - logEntry.Timestamp).Milliseconds;
            WcfLogger.LogIt(logEntry, "Performance");
        }
        public object BeforeCall(string operationName, object[] inputs)
        {
            var details = new Dictionary <string, object>();

            if (inputs != null)
            {
                for (var i = 0; i < inputs.Count(); i++)
                {
                    details.Add(
                        $"input-{i}",
                        inputs[i] != null ? inputs[i].ToString() : string.Empty
                        );
                }
            }
            return
                (WcfLogger.GetWcfLogEntry(
                     operationName, details, _serviceName
                     ));
        }
Ejemplo n.º 3
0
 public bool HandleError(Exception error)
 {
     WcfLogger.LogError(error.GetBaseException().Message, error);
     return(true);
 }