示例#1
0
        public bool HandleError(Exception error)
        {
            WcfLogger.LogError(error.GetBaseException().Message,
                               error);

            return(true);
        }
示例#2
0
        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");
        }
示例#3
0
        public object BeforeCall(string operationName, object[] inputs)
        {
            var details = new Dictionary <string, object>();

            if (inputs != null)
            {
                for (int i = 0; i < inputs.Count(); i++)
                {
                    details.Add($"input-{i}:", inputs[i] != null ? GetDetails(inputs[i]) : "");
                }
            }

            return(WcfLogger.GetWcfLogEntry(operationName, details,
                                            serviceName: _serviceName));
        }