Example: Log to a file and database