logging via memfault

Hello, 

I'm trying to log user data via memfault sdk. As I understand here I have to use 

MEMFAULT_LOG_SAVE to be able to send user logs to their dashboard. I tried that but it seems nothing is sent to the cloud. I could send traces and events but not user logs which for example printed via RTT or UART
I added something like 
but still no luck. 
Is there any suggestion for printing user logs even if no error occurs and displaying them in the memfault dashboard? 
and if that is not possible, is there any way to log user data via BLE same idea as UART or RTT? That is very useful for BLE applications where wire connection is difficult to use.
My regards,
platform: 
ncs: v2.3.0
soc: nrf5340
  • Hello,
    I am sorry, but we are short staffed this week due to Public Holidays in Norway. We will be back on Monday 22nd and hope to be able to answer all incoming requests within a couple of days, depending on the backlog. I am sorry for the inconvenience.

    Best regards,
    Priyanka

  • Hi,

    Have you tried setting the desired log level as well? CONFIG_MEMFAULT_LOG_LEVEL_*.

    You can also send logs over BLE using the Bluetooth: NUS shell transport. The Shell is automatically enabled as a logging backend when this is included in the application.

    Best regards,
    Jørgen

  • Hi Jørgen,

    I tried to add  CONFIG_MEMFAULT_LOG_LEVEL_INF=y but same result,  no log data in the dashboard. 

    Regarding NUS shell transport, I tried to test the sample shell_bt_nus, and I could send some shell commands using a smartphone, but I didn't /couldn't receive the logs via the BLE. Is there any configuration needed to enable logs in the prj.conf

    now I tried to add the next

    CONFIG_SHELL_BT_NUS_INIT_LOG_LEVEL_DBG=y

    and I added a delayable work to print logs frequently but I didn't receive those logs by BLE. 

    something like that!

    struct k_work_delayable test_work;

    static void test(struct k_work *work) {
        LOG_INF("Is logging correctly");
        LOG_ERR("Is logging correctly");
        LOG_WRN("Is logging correctly");
        k_work_reschedule(&test_work, K_SECONDS(1));
    }

    Regards,

  • I see that MEMFAULT logging is marked as experimental, which may be why you are not able to see logs properly.

    Did you enable the NUS logger shell by setting "CONFIG_SHELL_BT_NUS=y" and "CONFIG_SHELL_LOG_BACKEND=y" as well? 

    Edit: It seems you need to set "CONFIG_LOG_MODE_DEFERRED=y" to enable logging with the shell, as CONFIG_LOG_MODE_MINIMAL is incompatible with CONFIG_SHELL_LOG_BACKEND.

  • Thanks Jørgen, 

    Still no log output via BLE

    the prj.conf 

1 2