Script to read log

Need some simple scrip to read log on ROS and print warning (IP address in log string ) if in log appers “user logged in, 10.1.1.1”

Script in wiki not working.

Here is an example how to read log entries:
http://wiki.mikrotik.com/wiki/Manual:Scripting-examples#Detect_new_log_entry

Adapt the script for your needs.

i know this script, this line not working

:global currentTime [:totime [/log get [:pick $currentBuf($currentLineCount - 1)] time]];

RoS version 4.4, 4.5, 4.6, 5.1

if you look carefully, line you are quoting and line that is take from the script actually are not the same

:global currentTime [:totime [/log get [:pick $currentBuf($currentLineCount - 1)] time]];

line from linked script:

:global currentTime [ :totime [/log get [ :pick $currentBuf ($currentLineCount -1) ] time   ] ];

hence, result is not the same.

Here is your error:
:global currentTime [:totime [/log get [:pick $currentBuf($currentLineCount - 1)] time]];
                                                        ^^^ 
Should be:
:global currentTime [:totime [/log get [:pick $currentBuf ($currentLineCount - 1)] time]];