Maintenance for the week of January 19:
• PC/Mac: No maintenance – January 19
• NA megaservers for patch maintenance – January 21, 4:00AM EST (9:00 UTC) - 10:00AM EST (15:00 UTC)
• EU megaservers for patch maintenance – January 21, 9:00 UTC (4:00AM EST) - 15:00 UTC (10:00AM EST)
Will store chat through disconnects, relogs and char change. Allows manual copy and paste. Can't help you with a write to file addon, since afaik the API does not allow output to anything but the SavedVariables-file, which in turn probably needs an external reader to convert to readable text. And probably is too size limited to be useful.
There are two options that I can think of.
1) When ever you log into the game, type /chatlog and all you chat will be recorded into a .log file, which you can open with any text editor. (not really an addon, but is built into the game and is available.