Command Line Log Tool is not working

With the “log” tool, note the application name is used differently with small letters. You can get the info using the “app info” command

root@swi-mdm9x28:~# app info Legato_Logging
Legato_Logging
status: running
running processes:
legato_logging[10030] (10030)
app.name: Legato_Logging
app.md5: 66307acf09c83bfe76b8e5cfb1854e25
app.version: 1.0.0.20180102172619
legato.version: 17.09.0
root@swi-mdm9x28:~#
root@swi-mdm9x28:~# log list | grep logging
legato_logging
/legato_logging_exe @ DEBUG
/legato_logging_exe @ DEBUG
root@swi-mdm9x28:~# log level EMERGENCY legato_logging/*
Set filtering level for ‘legato_logging/*’ to ‘EMERGENCY’.
root@swi-mdm9x28:~# log list | grep logging
legato_logging
/legato_logging_exe @ EMERGENCY
/legato_logging_exe @ EMERGENCY
root@swi-mdm9x28:~#

Here’s a sample that I tested with:

void timer_handler ( le_timer_Ref_t timerRef)
{
LE_DEBUG(“Logging level DEBUG”);
LE_INFO (“Logging level INFO”);
LE_WARN (“Logging level WARNING”);
LE_ERROR(“Logging level ERROR”);
LE_CRIT (“Logging level CRITICAL”);
LE_EMERG(“Logging level EMERGENCY”);
return;
}

Setting to DEBUG will print all logs from the timer handler, INFO will print INFO and below, WARNING will print WARNING and below and so on.

Hope it helps!