I have the following settings enabled in IRC > logging:
Automatic log and reload (all buttons ticked)
Lock log files
Timestamp logs: [dd/mm/yy HH:nn:ss]
All other settings in this section are unchecked.
My logs are saved correctly with line colours and the reload logs option is working as it should be. $line() also returns correctly the logs that the reload logs options buffered into the window. It's only the subsequent lines which have been generated during the current session that $line() has an issue with.
Interestingly, $line().color manages to identify the formatting and correctly returns the starting colour number of any of these subsequent lines, despite the fact the starting colour has been stripped out of these subsequent lines when returned by $line()