Edge Action logs no longer available in syslog

Previously, I have been able to debug edge action code using console.log() statements. The logs were accessible by monitoring / capturing syslog output locally using logread.

Lately, however, I am no longer able to find these logs. (I am currently testing using Mangoh Red and WP77 Octave FW v3.5.2). The logs appear in syslog if logs are enabled in the Octave GUI Edge Action editor console, however this results in logs being sent to Octave cloud, which is both unnecessary and apparently billable. I have experimented with setting log levels for logread, but have not found a way to get the logs locally.

Can you tell me how to obtain console.log() output in local syslog / logread on the device?

Thanks.

Hi @dpinc
To get the console.log() output in the logs you can grep on action_id

root@fx30s:~# logread | grep action_id
May 22 09:47:46 fx30s user.info Legato:  INFO | actions[1464]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l646b1dff6cfd2365960fe05b | "hello this is a console log"

HTH,
Nicolas

Thanks, but the logs are not present unless logging is enabled, which is undesired.

For example, several logs are output in edge actions:

After a reboot with logs DISABLED, logs are not present:

root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# logread | egrep "(action_id)"
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#

When logging is enabled, see the result of enabling logs (Edge Action logs have already occurred after boot and been missed):

root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# logread | egrep "(action_id)"
May 22 11:43:55 swi-mdm9x28-wp user.info Legato:  INFO | cloudInterface[1282]/cloudcomp T=main | operation.c RunPushValue() 391 | admin_PushJson("/app/diagnostic/logs/filter",0, "[{"app":"actions","level":"INFO","pattern":"action_id"}]")
May 22 11:43:55 swi-mdm9x28-wp user.info Legato:  INFO | diagnostic[1307]/components T=main | diag.c diag_LogFilterChangeHandler() 825 | Received filters: [{"app":"actions","level":"INFO","pattern":"action_id"}]
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#

Rebooting with logs ENABLED result in the desired EA logs being output to syslog as desired:

root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# client_loop: send disconnect: Broken pipe
<...>
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# logread | egrep "(action_id)"
May 22 11:46:40 swi-mdm9x28-wp user.info Legato:  INFO | cloudInterface[1286]/cloudcomp T=main | operation.c RunSetDefaultValue() 431 | admin_SetJsonDefault("/app/diagnostic/logs/filter", "[{"app":"actions","level":"INFO","pattern":"action_id"}]")
May 22 11:46:40 swi-mdm9x28-wp user.info Legato:  INFO | cloudInterface[1286]/cloudcomp T=main | operation.c RunPushValue() 391 | admin_PushJson("/app/diagnostic/logs/filter",0, "[{"app":"actions","level":"INFO","pattern":"action_id"}]")
May 22 11:46:40 swi-mdm9x28-wp user.info Legato:  INFO | diagnostic[1311]/components T=main | diag.c diag_LogFilterChangeHandler() 825 | Received filters: [{"app":"actions","level":"INFO","pattern":"action_id"}]
May 22 11:46:40 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l64681f3c6cfd23659602d9ee | "*** ulpm_uptime timer count changed *** - now: 0"
May 22 11:46:40 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l644ad81318387d225c9fda75 | "bootup timer count changed - now: 0"
May 22 11:46:42 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l644ad81318387d225c9fda75 | "bootup timer count changed - now: 1"
May 22 11:46:42 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l644ad81318387d225c9fda75 | "starting ulpm_up_timer (only on boot timer val=1) "
May 22 11:46:42 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l644ad81318387d225c9fda75 | "getting current time for reference "
May 22 11:46:42 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l644ad81318387d225c9fda75 | "current time at bootup: 052223 11:46:42.024"
May 22 11:46:42 swi-mdm9x28-wp user.info Legato:  INFO | actions[1233]/actionRunner T=Javascript | actionRunner_JS.c js_LogInfoHandler() 1313 | action_id:l64681f3c6cfd23659602d9ee | "*** ulpm_uptime timer count changed *** - now: 0"
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#

The logs used to be output to syslog without costly diagnostic logs being enabled. Can you tell me how to once again obtain these logs without enabling diagnostic logs?
Thanks for your support!