=== Goal
We want to add logging to //Special:Investigate// so there is a record for every lookup made by a checkuser for someone's private information.
=== Acceptance criteria
===== Adding to the log:
* In the initial input form, generate a new log entry for every username/IP being looked up.
* As the user drills down into the data by clicking the //Show all N IPs for this user// and //Show all N users on this IP//, there is a new log entry created for the check with the same reason as they used in the initial form.
* As discussed previously, we will be using the [cul_type](https://github.com/wikimedia/mediawiki-extensions-CheckUser/blob/master/cu_log.sql#L20) column to indicate that the edits are coming from the new special page, so we only display those in the log page for Special:Investigate.
===== Displaying the logs:
* There is a link under Special:Investigate to navigate to the logs page - //Switch to investigation logs//
Similar to {F31623086}
* That leads to Special:InvestigateLog with the page title - //Investigation logs//
* There is a link under the page title to go back to the main form - //Switch to Investigate form//
* On the log page, log entries appear as:
```
00:00, 1 January 2020, CheckUser looked up information for 1.1.1.1 (talk | contribs | block) (Reason for investigation)
00:01, 1 January 2020, CheckUser looked up information for Foobar (talk | contribs | block) (Reason for investigation)
```
=== Notes
* There will be follow-up ticket(s) to add some filters to the logs like there are right now.
* There will be follow-up ticket(s) to have some messaging in the UI to let the user know when we are logging something.