It's worth noting that we've had something like that in Denmark since 2007. Four things are especially noteworthy:
- It's trivially easy to circumvent.
- The EU Court of Justice struck down this law for being too invasive. The actual logging has since been partially dismantled. Not that that helps the UK any these days.
- The police has denounced the practice as not useful in the real world. criminal evidence gathered this way is expensive and of questionable value.
- There was a cost associated with establishing it, both monetary (taxes + more expensive connections), and more unexpected social ones. A number of ISP employees suddenly needed security vetting from the internal intelligence service, a process which was bungled so that their dossiers were shared with employers. For instance, a number of people were outed as gay or trans to their bosses. Others simply quit rather than go through the procedure.
... Not to mention that the oversight more or less stopped at the security vetting of individuals. As usual with procedures established these days, no transparency or public oversight was included. Not even the basic right to review your own logs. Expect similar in the UK, I'm afraid.