示例#1
0
        internal static void LogProxyServiceError(this ServiceFabricProviderEventSource eventSource, string requestUri, string requestMethod, Exception exception)
        {
            string exceptionDetails = $"Type: {exception.GetType()}, Message: {exception.Message}, StackTrace: {exception.StackTrace}, InnerException: {exception.InnerException}";
            string logMessage       = $"Proxy service request {requestUri} with method {requestMethod} resulted in error. Exception Details - {exceptionDetails}";

            eventSource.LogProxyServiceError(logMessage);
        }
示例#2
0
        internal static void LogFabricServiceInformation(this ServiceFabricProviderEventSource eventSource, StatefulService service, string message, params object[] args)
        {
            string formattedMessage = string.Format(message, args);

            eventSource.LogFabricServiceInformation(
                service.Context.ServiceName.ToString(),
                service.Context.ServiceTypeName,
                service.Context.ReplicaId,
                service.Context.PartitionId,
                service.Context.CodePackageActivationContext.ApplicationName,
                service.Context.CodePackageActivationContext.ApplicationTypeName,
                service.Context.NodeContext.NodeName,
                formattedMessage);
        }