Ejemplo n.º 1
0
        private static Action <LoggingEvent> SendInfoLogAction(
            [NotNull] IServerStreamWriter <StandaloneVerificationResponse> responseStream,
            ServiceCallStatus callStatus)
        {
            Action <LoggingEvent> action =
                e =>
            {
                if (e.Level.Value < Level.Info.Value)
                {
                    return;
                }

                var response = new StandaloneVerificationResponse
                {
                    Message = new LogMsg
                    {
                        Message      = e.RenderedMessage,
                        MessageLevel = e.Level.Value
                    },
                    ServiceCallStatus = (int)callStatus
                };

                MessagingUtils.TrySendResponse(responseStream, response);
            };

            return(action);
        }