Read System Logs via script

Hi,

I would like to read the System log with script.

For example below my log system:

[F454 gateway] Data received is not a message: *5*7*##
[F454 gateway] Data received is not a message: *5*8*##

I would like to read the string
*5*8*## to change the icon status.

Does anyone have any suggestions on how to do this?

Thanks in advance,
Antonio