0.1.9 • Published 2 years ago

graphql-logging v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

graphql-logging

graphql-logging is a logging middleware for GraphQL servers, providing detailed logs for incoming GraphQL requests.

Features

  • Logs incoming GraphQL requests with details such as query, variables, execution time, and more.
  • Helps in debugging and performance monitoring of GraphQL APIs.
  • Easy to integrate with existing GraphQL server setups.

Installation

Install the package using npm:

npm install graphql-logging

Usage

Basic Usage

1. Install Dependencies:

npm install graphql-logging

2. Add in their code:

const GraphQLLogger = require('graphql-logging');

const logger = new GraphQLLogger();

// Log some messages
logger.log('GraphQL request received');
logger.log('Query execution completed');

// Export logs to JSON
logger.exportLogs({ format: 'json' });

// Export logs to CSV
logger.exportLogs({ format: 'csv' });

// Get and print all logs
console.log('All Logs:', logger.getLogs());

Contributing

Contributions are welcome! Please follow the contribution guidelines to contribute to this project.

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago