code: func EmitAndLogInvariantViolation(opts Options, f func(l log.Logger)) {
  	EmitInvariantViolation(opts)
  
  	logger := opts.Logger().WithFields(
  		log.NewField(InvariantViolatedLogFieldName, InvariantViolatedLogFieldValue))
  	f(logger)
  
  	panicIfEnvSet()
  }
docs: // EmitAndLogInvariantViolation calls EmitInvariantViolation and then calls the provided function
  // with a supplied logger that is pre-configured with an invariant violated field. Optionally panics
  // if the ShouldPanicEnvironmentVariableName is set to "true".