Is the dynamic address being assigned with DHCP, IPCP or some other method? If it's a DHCP assignment, the router automatically logs these using messages like this one:
Nov 28 21:42:34: %DHCP-6-ADDRESS_ASSIGN: Interface GigabitEthernet0/9 assigned DHCP address 172.23.2.49, mask 255.255.252.0, hostname R1
This blog post suggests there's some problem with DHCP logging. I followed the link and its describing some kind of applet installation. All over my head.
This cisco page describes turning on logging here. Is this what you recommended?
Is this the minimum which won't log too much (all I want is the DHCP)?
You can always count on Ivan to have the details. I was unaware that the DHCP log only occurred on initial assignment.
If you do decide to use an EEM applet, you don't need to do anything really special with the logging. Just turn it on in the configuration with "logging buffered 262144" (I use a 256KB logging buffer because the default is too small to be useful.)
Another angle to take that might be easier is to use the DDNS functionality of the router with a service like Dyn. This way you always have a hostname you can reference with the current address and can see the history on their web site. This can be configured as follows:
ip ddns update method DDNS_Dyn HTTP add http://username:email@example.com/nic/update?hostname=<h>&myip=<a>; interval maximum 90 0 0 0 ! interface GigabitEthernet0/9 ip ddns update hostname example.dyndns.com ip ddns update DDNS_Dyn