Print in log the public ip

Hello,
I have a static public IP from my ISP. I read here http://forum.mikrotik.com/t/find-external-ip/66743/1 that I can print the public IP, using the command

:put [/ip cloud get public-address]

which works fine in my case!

Is there a way to monitor if my public IP change, to add a message in the log? For example, :

//Pseudocode
If my public IP != MY_STATIC_IP THEN PRINT TO LOG “public ip is 111.111.111”_

Yes, is possible,
but if your ISP give you a Static IP as you say, all this are useless…

Instead to hypotize someting, write what you want at the end and why.

Many ISP say that you get static IP, but in fact its just DHCP with long lease time. As long as your modem/router are online, it will not change.

Here is just one script I found using goolge to monitor and log outside IP changes.
https://mhelp.pro/mikrotik-scripts-notification-when-the-external-ip-address-of-the-router-changes/

Sorry, but on my country Static (Public) IP are Static (Public) IP,
otherwise are called Dynamic Public IP.
Also I have ALL my users with Dynamic Public IPv4/v6, but if someone want one or more Static (Public) IPv4, we rent for each one at 10€ for month.
Fixed (Public) IPv6 pool are free.

The reason I am asking this is because in Mikrotik I have 2 connections from ISPs (one internet line is primary and if it fails for any reason backup line is enabled).
From both ISPs, I have static IP which doesn’t change. So, I want to monitor how many often my primary internet line disconnects.

EDIT
I followed this article where @Jotne posted and I managed to create a script to do it.