예제 #1
0
        public void Enrich(LogEvent e, out string propertyName, out object propertyValue)
        {
            propertyName  = null;
            propertyValue = null;

            e.AddProperty(KnownFabricProperty.ServiceName, _context.ServiceName);
            e.AddProperty(KnownFabricProperty.ServiceTypeName, _context.ServiceTypeName);
            e.AddProperty(KnownFabricProperty.PartitionId, _context.PartitionId);
            e.AddProperty(KnownFabricProperty.ApplicationName, _context.CodePackageActivationContext.ApplicationName);
            e.AddProperty(KnownFabricProperty.ApplicationTypeName, _context.CodePackageActivationContext.ApplicationTypeName);
            e.AddProperty(KnownFabricProperty.NodeName, _context.NodeContext.NodeName);
            e.AddProperty(KnownProperty.Version, _context.CodePackageActivationContext.CodePackageVersion);

            if (_context is StatelessServiceContext)
            {
                e.AddProperty(KnownFabricProperty.InstanceId, _context.ReplicaOrInstanceId);
            }

            if (_context is StatefulServiceContext)
            {
                e.AddProperty(KnownFabricProperty.ReplicaId, _context.ReplicaOrInstanceId);
            }
        }
예제 #2
0
        public void Enrich(LogEvent e, out string propertyName, out object propertyValue)
        {
            propertyName  = null;
            propertyValue = null;

            e.AddProperty("applicationName", _context.CodePackageActivationContext.ApplicationName);
            e.AddProperty("applicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName);
            e.AddProperty(KnownProperty.Version, _context.CodePackageActivationContext.CodePackageVersion);
            e.AddProperty(KnownProperty.NodeName, _context.NodeContext.NodeName);
            e.AddProperty("nodeType", _context.NodeContext.NodeType);
            e.AddProperty(KnownProperty.NodeIp, _context.NodeContext.IPAddressOrFQDN);
            e.AddProperty("partitionId", _context.PartitionId);
            e.AddProperty(KnownProperty.NodeInstanceId, _context.NodeContext.NodeInstanceId);
            e.AddProperty("replicaOrInstanceId", _context.ReplicaOrInstanceId);
            e.AddProperty(KnownProperty.ApplicationName, _context.ServiceName);
            e.AddProperty("serviceTypeName", _context.ServiceTypeName);
        }