Log uptime to database