npm install polaris-graphql-logger
Polaris GraphQL Logger allows you to write standardized logs easily, using a polaris-logs logger, and wrapping a classic graphql logger.
This interface defines the graphql log properties that can be logged whenever the logger is called.
This interface extends the PolarisLogProperties
that polaris-logs
library offers.
The property that GraphQLLogProperties
adds in addition is:
- operationName(string - Optional): the name of the requested graphql operation.
This interface defines all of the logging level options that available in the graphql logger.
It provides the usual methods of logger, such as warn
, error
, fatal
, info
, trace
and debug
.
This class gives you the ability to send PolarisGraphQLContext and PolarisLogProperties and have it build a log according to the standard way.