Attribute every changes to file like txt with time stamp

Hello!

How i can easy make example automation what write every changes of some attibute of device to file?
I have tried use ChatGPT, and tried notify log to file and shell_command.log_to_file but nothing writes to file what is under /config/logs dir. I have set folder to 777 and file 666 but nothing still.