Logging
Ariadne logs all errors using the default ariadne logger. To define a custom logger instead, pass its name to the logger argument when instantiating your application:
from ariadne.wsgi import GraphQL
from .schema import schema
app = GraphQL(schema, logger="admin.graphql")
The logger argument is supported by the following functions and objects:
ariadne.graphqlariadne.graphql_syncariadne.subscribeariadne.asgi.GraphQLariadne.wsgi.GraphQL
Example with a custom logger (ASGI):
from ariadne.asgi import GraphQL
from .schema import schema
app = GraphQL(schema, logger="myapp.graphql")
See also: Mutations and Error messaging for patterns that benefit from consistent logging when debugging failures.