Added BaseProfiler base class to common and refactored functionalities of logging profilers.