logging/log_core.h: Fix unused variable diagnose
logging/log_core.h: Fix unused variable diagnose

The current _mode variable can be diagnosed as unused by tools like
clang-tidy-14. This add a small fix to by pass this situation and allow
run analysis tool without this warning/error.

Signed-off-by: Gerson Fernando Budke <0ad1c92223f8f375c46e39c6141096f3d30896b4@gmail.com>

zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,galak/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr