diff --git a/lib/opcodes.py b/lib/opcodes.py
index 5d14bcdb7506849486379746ea4d597ff483b9d2..b35cc782bd0a1fe9db4e2ae530869faa71bf3506 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -468,8 +468,9 @@ class BaseOpCode(objectutils.ValidatedSlots):
       if set_defaults or hasattr(self, attr_name):
         attr_val = getattr(self, attr_name)
         if not test(attr_val):
-          logging.error("OpCode %s, parameter %s, has invalid type %s/value %s",
-                        self.OP_ID, attr_name, type(attr_val), attr_val)
+          logging.error("OpCode %s, parameter %s, has invalid type %s/value %s"
+                        " expecting type %s",
+                        self.OP_ID, attr_name, type(attr_val), attr_val, test)
           raise errors.OpPrereqError("Parameter '%s.%s' fails validation" %
                                      (self.OP_ID, attr_name),
                                      errors.ECODE_INVAL)