logging: Increase package size limit to 2047

Package length was previously stored on 10 bits which limited
package size to 1023 bytes. Descriptor which contained package
length field had one unused bit which can be used to increase
package length field to 11 bits doubling the maximum package
length.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
diff --git a/include/zephyr/logging/log_msg.h b/include/zephyr/logging/log_msg.h
index 0113d8b..4523327 100644
--- a/include/zephyr/logging/log_msg.h
+++ b/include/zephyr/logging/log_msg.h
@@ -44,7 +44,7 @@
 
 #define Z_LOG_MSG_LOG 0
 
-#define Z_LOG_MSG_PACKAGE_BITS 10
+#define Z_LOG_MSG_PACKAGE_BITS 11
 
 #define Z_LOG_MSG_MAX_PACKAGE BIT_MASK(Z_LOG_MSG_PACKAGE_BITS)
 
@@ -58,7 +58,6 @@
 	uint32_t level:3;
 	uint32_t package_len:Z_LOG_MSG_PACKAGE_BITS;
 	uint32_t data_len:12;
-	uint32_t reserved:1;
 };
 
 union log_msg_source {
@@ -149,7 +148,6 @@
 	.level = _level, \
 	.package_len = _plen, \
 	.data_len = _dlen, \
-	.reserved = 0, \
 }
 
 #define Z_LOG_MSG_CBPRINTF_FLAGS(_cstr_cnt) \
diff --git a/subsys/logging/log_msg.c b/subsys/logging/log_msg.c
index 8bc1e2e..3ca3a5d 100644
--- a/subsys/logging/log_msg.c
+++ b/subsys/logging/log_msg.c
@@ -12,6 +12,9 @@
 #include <zephyr/logging/log.h>
 LOG_MODULE_DECLARE(log);
 
+BUILD_ASSERT(sizeof(struct log_msg_desc) == sizeof(uint32_t),
+	     "Descriptor must fit in 32 bits");
+
 /* Returns true if any backend is in use. */
 #define BACKENDS_IN_USE() \
 	!(IS_ENABLED(CONFIG_LOG_FRONTEND) && \