diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index bc539884e5..ea6270fdf2 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -814,19 +814,32 @@ std::string V4L2VideoDevice::logPrefix() const
  */
 int V4L2VideoDevice::getFormat(V4L2DeviceFormat *format)
 {
+	int ret;
+
 	switch (bufferType_) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
-		return getFormatSingleplane(format);
+		ret = getFormatSingleplane(format);
+		break;
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
 	case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
-		return getFormatMultiplane(format);
+		ret = getFormatMultiplane(format);
+		break;
 	case V4L2_BUF_TYPE_META_CAPTURE:
 	case V4L2_BUF_TYPE_META_OUTPUT:
-		return getFormatMeta(format);
+		ret = getFormatMeta(format);
+		break;
 	default:
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
 	}
+
+	if (ret)
+		return ret;
+
+	LOG(V4L2, Debug) << "returned format: " << *format;
+
+	return 0;
 }
 
 /**
@@ -841,19 +854,34 @@ int V4L2VideoDevice::getFormat(V4L2DeviceFormat *format)
  */
 int V4L2VideoDevice::tryFormat(V4L2DeviceFormat *format)
 {
+	int ret;
+
+	LOG(V4L2, Debug) << "trying format: " << *format;
+
 	switch (bufferType_) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
-		return trySetFormatSingleplane(format, false);
+		ret = trySetFormatSingleplane(format, false);
+		break;
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
 	case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
-		return trySetFormatMultiplane(format, false);
+		ret = trySetFormatMultiplane(format, false);
+		break;
 	case V4L2_BUF_TYPE_META_CAPTURE:
 	case V4L2_BUF_TYPE_META_OUTPUT:
-		return trySetFormatMeta(format, false);
+		ret = trySetFormatMeta(format, false);
+		break;
 	default:
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
 	}
+
+	if (ret)
+		return ret;
+
+	LOG(V4L2, Debug) << "returned format: " << *format;
+
+	return 0;
 }
 
 /**
@@ -869,6 +897,8 @@ int V4L2VideoDevice::setFormat(V4L2DeviceFormat *format)
 {
 	int ret;
 
+	LOG(V4L2, Debug) << "setting format: " << *format;
+
 	switch (bufferType_) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
@@ -894,6 +924,8 @@ int V4L2VideoDevice::setFormat(V4L2DeviceFormat *format)
 	format_ = *format;
 	formatInfo_ = &PixelFormatInfo::info(format_.fourcc);
 
+	LOG(V4L2, Debug) << "returned format: " << *format;
+
 	return 0;
 }
 
