Add child to logging from context

Hi

I would like to add child field for logging. I want ta add a field from context.currenctUser?.code but I cant implement. How to handle this?
I use dbAuth and all queries or mutations needs authentication.

I followed this function, probably its not allowed to add additional field from context

/**

  • This plugin logs every time an operation is being executed and
  • when the execution of the operation is done.
  • It adds information using a child logger from the context
  • such as the operation name, request id, errors, and header info
  • to help trace and diagnose issues.
  • Tracing and timing information can be enabled via the
  • GraphQLHandlerOptions traction option.
  • @see Plugin Lifecycle (Envelop)
  • @returns
    */
    export const useRedwoodLogger = (
    loggerConfig: LoggerConfig,
    ): Plugin => {
    const logger = loggerConfig.logger
    const level = loggerConfig.options?.level || logger.level || ‘warn’

const childLogger = logger.child({
name: ‘graphql-server’,
})

childLogger.level = level

const includeOperationName = loggerConfig?.options?.operationName
const includeRequestId = loggerConfig?.options?.requestId
const includeUserAgent = loggerConfig?.options?.userAgent
const includeQuery = loggerConfig?.options?.query
const excludeOperations = loggerConfig.options?.excludeOperations