apollographql / apollo-server

🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
https://www.apollographql.com/docs/apollo-server/
MIT License
13.79k stars 2.03k forks source link

Investigate whether there exists a 3rd-party equivalent to our Logger type #6056

Closed glasser closed 2 years ago

glasser commented 2 years ago

Our Logger type is just a basic TS interface (with default implementation provided by the loglevel npm package) for a error/warning/etc thing. We allow folks to pass in any matching implementation and have some tests that show it's possible to use this with winston, bunyan, log4js, and loglevel. We should take at least a moment to see if there's some existing package out there (perhaps just loglevel which is a dependency already) that lets us define this TS type in a way that is compatible with all those implementations without us having to export ourself. (This is part of #FIXME)

trevor-scheer commented 2 years ago

Proposing this, which will also be useful to gateway. https://github.com/apollographql/apollo-utils/pull/55