boot: zephyr: use bootutil_log.h, not sys_log.h

Now that mcuboot has its own logging subsystem, use that instead.

Note that this changes the domain from "[BOOTLOADER]" to "[MCUBOOT]".

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
diff --git a/boot/zephyr/flash_map.c b/boot/zephyr/flash_map.c
index 73863c3..502e30d 100644
--- a/boot/zephyr/flash_map.c
+++ b/boot/zephyr/flash_map.c
@@ -26,9 +26,8 @@
 #include <hal/hal_flash.h>
 #include <sysflash/sysflash.h>
 
-#define SYS_LOG_DOMAIN "BOOTLOADER"
-#define SYS_LOG_LEVEL SYS_LOG_LEVEL_INFO
-#include <logging/sys_log.h>
+#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_INFO
+#include "bootutil/bootutil_log.h"
 
 extern struct device *boot_flash_device;
 
@@ -62,7 +61,7 @@
 {
 	int i;
 
-	SYS_LOG_DBG("%s: area %d", __func__, id);
+	BOOT_LOG_DBG("%s: area %d", __func__, id);
 
 	for (i = 0; i < ARRAY_SIZE(part_map); i++) {
 		if (id == part_map[i].fa_id)
@@ -85,8 +84,8 @@
 int flash_area_read(const struct flash_area *area, uint32_t off, void *dst,
 		    uint32_t len)
 {
-	SYS_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
-			area->fa_id, off, len);
+	BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
+		     area->fa_id, off, len);
 	return flash_read(boot_flash_device, area->fa_off + off, dst, len);
 }
 
@@ -95,8 +94,8 @@
 {
 	int rc = 0;
 
-	SYS_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
-			area->fa_id, off, len);
+	BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
+		     area->fa_id, off, len);
 	flash_write_protection_set(boot_flash_device, false);
 	rc = flash_write(boot_flash_device, area->fa_off + off, src, len);
 	flash_write_protection_set(boot_flash_device, true);
@@ -105,8 +104,8 @@
 
 int flash_area_erase(const struct flash_area *area, uint32_t off, uint32_t len)
 {
-	SYS_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
-			area->fa_id, off, len);
+	BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
+		     area->fa_id, off, len);
 	return flash_erase(boot_flash_device, area->fa_off + off, len);
 }
 
@@ -136,7 +135,7 @@
 	uint32_t len;
 	uint32_t max_cnt = *cnt;
 
-	SYS_LOG_DBG("%s: lookup area %d", __func__, idx);
+	BOOT_LOG_DBG("%s: lookup area %d", __func__, idx);
 	/*
 	 * This simple layout has uniform slots, so just fill in the
 	 * right one.
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index ca88fbd..50da986 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -18,9 +18,8 @@
 #include <flash.h>
 #include <asm_inline.h>
 
-#define SYS_LOG_DOMAIN "BOOTLOADER"
-#define SYS_LOG_LEVEL SYS_LOG_LEVEL_INFO
-#include <logging/sys_log.h>
+#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_INFO
+#include "bootutil/bootutil_log.h"
 
 #if defined(MCUBOOT_TARGET_CONFIG)
 #include MCUBOOT_TARGET_CONFIG
@@ -46,34 +45,34 @@
 	struct vector_table *vt;
 	int rc;
 
-	SYS_LOG_INF("Starting bootloader");
+	BOOT_LOG_INF("Starting bootloader");
 
 	os_heap_init();
 
 	boot_flash_device = device_get_binding(FLASH_DRIVER_NAME);
 	if (!boot_flash_device) {
-		SYS_LOG_ERR("Flash device not found");
+		BOOT_LOG_ERR("Flash device not found");
 		while (1)
 			;
 	}
 
 	rc = boot_go(&rsp);
 	if (rc != 0) {
-		SYS_LOG_ERR("Unable to find bootable image");
+		BOOT_LOG_ERR("Unable to find bootable image");
 		while (1)
 			;
 	}
 
-	SYS_LOG_INF("Bootloader chainload address: 0x%x", rsp.br_image_addr);
+	BOOT_LOG_INF("Bootloader chainload address: 0x%x", rsp.br_image_addr);
 	vt = (struct vector_table *)(rsp.br_image_addr +
 				     rsp.br_hdr->ih_hdr_size);
 	irq_lock();
 	_MspSet(vt->msp);
 
-	SYS_LOG_INF("Jumping to the first image slot");
+	BOOT_LOG_INF("Jumping to the first image slot");
 	((void (*)(void))vt->reset)();
 
-	SYS_LOG_ERR("Never should get here");
+	BOOT_LOG_ERR("Never should get here");
 	while (1)
 		;
 }