@veriown/express-graphql-logger

0.3.13 • Public • Published

@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.

/@veriown/express-graphql-logger/

    Package Sidebar

    Install

    npm i @veriown/express-graphql-logger

    Weekly Downloads

    20

    Version

    0.3.13

    License

    ISC

    Unpacked Size

    1.82 MB

    Total Files

    15

    Last publish

    Collaborators

    • charantor
    • dwarner_veriown
    • nareshthakur
    • rupinder02