Esempio n. 1
0
        private static void LogHealthStatus(MonitorableEndpoint endpoint, EndpointHealth endpointHealth)
        {
            switch (endpointHealth.Status)
            {
            case EndpointStatus.TimedOut:
            case EndpointStatus.Unhealthy:
                Logger.WarnFormat("Status of {0}: Status={1}, ResponseTime={2}", endpoint, endpointHealth.Status, endpointHealth.ResponseTime);
                break;

            case EndpointStatus.Faulty:
                Logger.ErrorFormat("Status of {0}: Status={1}, ResponseTime={2}, Details={3}", endpoint, endpointHealth.Status, endpointHealth.ResponseTime, endpointHealth.PrettyFormatDetails());
                break;

            default:
                Logger.InfoFormat("Status of {0}: Status={1}, ResponseTime={2}", endpoint, endpointHealth.Status, endpointHealth.ResponseTime);
                break;
            }
        }