@veriown/express-graphql-logger

Express middleware to log GraphQL requests

Stats

StarsIssuesVersionUpdatedCreatedSize
@veriown/express-graphql-logger
0.3.132 years ago3 years agoMinified + gzip package size for @veriown/express-graphql-logger in KB

Readme

@veriown/express-graphql-logger

Express Logging middleware for Graphql Requests

It logs requests in Apache Combined format.

Installation

npm install --save @veriown/express-graphql-logger

Usage

const express = require('express');
const graphqlLogger = require('@veriown/express-graphql-logger');

const app = express();

const loggerInstance = { info: fn }; // any object which has `info` function e.g a winston instance

app.use(graphqlLogger(loggerInstance, { splitLog: false })); // splitLog: Log request and response separately. Default: false. Log on response only.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.