Updated CLogger with more efficient C++ code