The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Envelop Logo

Envelop

Get Started

Plugin Hub > useLogger

yarn add @envelop/core

useLogger#

Logs parameters and information about the execution phases. You can easily plug your custom logger.

import { envelop, useLogger } from '@envelop/core'; import { buildSchema } from 'graphql'; const getEnveloped = envelop({ plugins: [ useLogger({ logFn: (eventName, args) => { // Event could be `execute-start` / `execute-end` / `subscribe-start` / `subscribe-end` // `args` will include the arguments passed to execute/subscribe (in case of "start" event) and additional result in case of "end" event. }, }), // ... other plugins ... ], });

Plugin Details