about ip pool logging.

in my country laws says to keep ip pool logging the example log style is ;

ip address usage start date-time usage stop date-time MAC address
xxx.xxx.xxx.xxx dd.mm.yyyy-xx:xx:xx dd.mm.yyyy-xx:xx:xx xx-xx-xx-xx-xx-xx

like that …

how i do a script for logging like that and is it possible to use in hotspot mode or user manager mode.

and can i storage them in usb flash storage or send them with mail daily …

thanks for your support. how i fix them …

( i know to use remote log server like kiwi or etc… but i want to fix them in hardware and in usb storage )

Try this here

ip pool used logging

{
:global ip
:global mac
:global pool
:global date
:global time
:foreach i in=[/ip pool used find ] do={
:set date [/system clock get date ];
:set time [/system clock get time ];
:set ip [/ip pool used get $i address ];
:set mac [/ip pool used get $i info ];
:set pool [/ip pool used get $i pool ];
:log warning ("IP:$ip Mac:$mac Pool:$pool Date:$date Time:$time");
}}

I do not understand what type of Country loves billions of Log Files from millions of DHCP Servers !!