code: func logPanic(r interface{}) {
  	// Same as stdlib http server code. Manually allocate stack trace buffer size
  	// to prevent excessively large logs
  	const size = 64 << 10
  	stacktrace := make([]byte, size)
  	stacktrace = stacktrace[:runtime.Stack(stacktrace, false)]
  	if _, ok := r.(string); ok {
  		klog.Errorf("Observed a panic: %s\n%s", r, stacktrace)
  	} else {
  		klog.Errorf("Observed a panic: %#v (%v)\n%s", r, r, stacktrace)
  	}
  }
docs: // logPanic logs the caller tree when a panic occurs.