sim: Clean up logging
Make error the default log level in the sim shims, and add a function
name to two of the calls.
#include "../../boot/bootutil/src/bootutil_priv.h"
-#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_DEBUG
+#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_ERROR
#include <bootutil/bootutil_log.h>
extern int sim_flash_erase(void *flash, uint32_t offset, uint32_t size);
@@ -146,7 +146,8 @@ int flash_area_read(const struct flash_area *area, uint32_t off, void *dst,
int flash_area_write(const struct flash_area *area, uint32_t off, const void *src,
uint32_t len)
{
- BOOT_LOG_DBG("area=%d, off=%x, len=%x", area->fa_id, off, len);
+ BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
+ area->fa_id, off, len);
return hal_flash_write(area->fa_id,
area->fa_off + off,
src, len);
@@ -154,7 +155,8 @@ int flash_area_write(const struct flash_area *area, uint32_t off, const void *sr
int flash_area_erase(const struct flash_area *area, uint32_t off, uint32_t len)
{
- BOOT_LOG_DBG("area=%d, off=%x, len=%x", area->fa_id, off, len);
+ BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
+ area->fa_id, off, len);
return hal_flash_erase(area->fa_id,
area->fa_off + off,
len);
