/// <summary>
 /// Recorded by this instance's <see cref="ISubscriptionEventRouter"/> when it receives a new subscription event from
 /// an externally connected source such as a message queue or service or bus. For single server configurations this event
 /// is recorded when an event is passed from the internal publishing queue directly to the <see cref="ISubscriptionEventRouter"/>.
 /// </summary>
 /// <param name="logger">The logger doing the logging.</param>
 /// <param name="eventData">The event data that was received from a data source.</param>
 public static void SubscriptionEventReceived(
     this IGraphEventLogger logger,
     SubscriptionEvent eventData)
 {
     logger.Log(
         LogLevel.Debug,
         () => new SubscriptionEventReceivedLogEntry(eventData));
 }
 /// <summary>
 /// Recorded when a subscription client is no longer connected or otherwise dropped
 /// by ASP.NET. The server will process no more messages from the client.
 /// </summary>
 /// <param name="logger">The logger doing the logging.</param>
 /// <param name="client">The client that was dropped and is being cleaned up.</param>
 public static void SubscriptionClientDropped(
     this IGraphEventLogger logger,
     ISubscriptionClientProxy client)
 {
     logger.Log(
         LogLevel.Debug,
         () => new SubscriptionClientDroppedLogEntry(client));
 }
 /// <summary>
 /// Recorded when a subscription client is no longer connected or otherwise dropped
 /// by ASP.NET. The server will process no more messages from the client.
 /// </summary>
 /// <typeparam name="TSchema">The type of the schema the server was created for.</typeparam>
 /// <param name="logger">The logger doing the logging.</param>
 /// <param name="server">The server that was created.</param>
 public static void SubscriptionServerCreated <TSchema>(
     this IGraphEventLogger logger,
     ISubscriptionServer <TSchema> server)
     where TSchema : class, ISchema
 {
     logger.Log(
         LogLevel.Debug,
         () => new SubscriptionServerCreatedLogEntry <TSchema>(server));
 }
 /// <summary>
 /// Recorded when the startup services registers a publically available ASP.NET MVC route to which
 /// end users can intiate a websocket request through which subscriptions can be established.
 /// </summary>
 /// <typeparam name="TSchema">The type of the schema the route was registered for.</typeparam>
 /// <param name="logger">The logger.</param>
 /// <param name="routePath">The relative route path (e.g. '/graphql').</param>
 public static void SchemaSubscriptionRouteRegistered <TSchema>(
     this IGraphEventLogger logger,
     string routePath)
     where TSchema : class, ISchema
 {
     logger.Log(
         LogLevel.Debug,
         () => new SchemaSubscriptionRouteRegisteredLogEntry <TSchema>(routePath));
 }
 /// <summary>
 /// Recorded when a new client is registered against a subscription server and
 /// the graphql server begins monitoring it for messages.
 /// </summary>
 /// <typeparam name="TSchema">The type of the schema the client was registered for.</typeparam>
 /// <param name="logger">The logger doing the logging.</param>
 /// <param name="server">The server which created the client.</param>
 /// <param name="client">The client that was created.</param>
 public static void SubscriptionClientRegistered <TSchema>(
     this IGraphEventLogger logger,
     ISubscriptionServer <TSchema> server,
     ISubscriptionClientProxy client)
     where TSchema : class, ISchema
 {
     logger.Log(
         LogLevel.Debug,
         () => new SubscriptionClientRegisteredLogEntry <TSchema>(server, client));
 }
 /// <summary>
 /// Recorded when an Apollo server component registers a request with the configured subscription event
 /// listener for this ASP.NET server instance. This log entry is recorded when the first connected client
 /// begins a subscription for an event.
 /// </summary>
 /// <param name="eventName">Name of the event that is now being monitored.</param>
 public void EventMonitorStarted(SubscriptionEventName eventName)
 {
     _logger.Log(
         LogLevel.Trace,
         () => new ApolloServerEventMonitorStartedLogEntry <TSchema>(_server, eventName));
 }
示例#7
0
 /// <summary>
 /// Recorded when the configured client proxy recieves a new message from the
 /// actual client.
 /// </summary>
 /// <param name="message">The message that was received.</param>
 public void MessageReceived(ApolloMessage message)
 {
     _logger.Log(
         LogLevel.Trace,
         () => new ApolloClientMessageReceivedLogEntry(_client, message));
 }