cdmbase / graphql-rabbitmq-subscriptions

A graphql subscriptions implementation using rabbimq and apollo's graphql-subscriptions
MIT License
118 stars 27 forks source link

What's `logger`? #4

Closed giautm closed 7 years ago

giautm commented 7 years ago

I read example and still dont understand what's logger. How i make it work?

import { AmqpPubSub } from 'graphql-rabbitmq-subscriptions';
const logger = <log function>;
const pubsub = new AmqpPubSub({logger});
const subscriptionManager = new SubscriptionManager({
  schema,
  pubsub,
  setupFunctions: {},
});
giautm commented 7 years ago

And how i can removed logger if i don't need?

veeramarni commented 7 years ago

It's bunyan logger implementation. I will make it optional in future. See @cdm-logger/server, to implement logging. Also updated readme with its implementation.

We will soon update the graphql version when we do that we will revise whether to support more loggers or make it optional.

giautm commented 7 years ago

Tks for the answer, so i close this issues. 😄