Logs inputs to database