moving logging to central class to prevent logging in release builds