Depending on time interval, you could either create a cron job, or run a bash script.
For example
Code:
while true ; do cat /sys/class/net/eth0/operstate >> network_stats ; sleep 60 ; done
The number after sleep is the time to wait in seconds. So this example takes the stats every minute.
If you only want to log changes, you could do more sophisticated stuff, probably using grep and sed.