Added createLog function to Swift Class.