Much more sensible C system, which wraps the c++ functions
Now alters amount logged based on runtime performance