Boot: Make MCUBoot logging optional

Add new MCUBOOT_LOG_LEVEL CMake variable to the MCUBoot configuration.
In a debug build the MCUBoot logging can be set to several levels.
The logging can also be entirely disabled and thus the code size can be
reduced. In case of a release build the value of MCUBOOT_LOG_LEVEL is
overridden and the logging is disabled in MCUBoot.

Change-Id: I55ad8f85fdd0921f07a9c156858fadecf81a7449
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/docs/user_guides/tfm_secure_boot.rst b/docs/user_guides/tfm_secure_boot.rst
index d2b5ebb..497654b 100644
--- a/docs/user_guides/tfm_secure_boot.rst
+++ b/docs/user_guides/tfm_secure_boot.rst
@@ -359,6 +359,23 @@
       key-hash (it can have more public keys embedded in and it may have to look
       for the matching one). All the public key(s) must be known at MCUBoot
       build time.
+- MCUBOOT_LOG_LEVEL:
+    Can be used to configure the level of logging in MCUBoot. The possible
+    values are the following:
+
+    - **LOG_LEVEL_OFF**
+    - **LOG_LEVEL_ERROR**
+    - **LOG_LEVEL_WARNING**
+    - **LOG_LEVEL_INFO**
+    - **LOG_LEVEL_DEBUG**
+
+    The logging in MCUBoot can be disabled and thus the code size can be reduced
+    by setting it to ``LOG_LEVEL_OFF``. Its value depends on the build type. If
+    the build type is ``Debug`` and a value has been provided (e.g. through the
+    command line or the CMake GUI) then that value will be used, otherwise it is
+    ``LOG_LEVEL_INFO`` by default. In case of different kinds of ``Release``
+    builds its value is set to ``LOG_LEVEL_OFF`` (any other value will be
+    overridden).
 
 Image versioning
 ================