src/backend/logging/frontend_logger.cpp
/** * @brief Return the frontend logger based on logging type
 * @param logging type can be write ahead logging or write behind logging
 */
@brief Return the frontend logger based on logging type
@param logging type can be write ahead logging or write behind logging
@brief Return the frontend logger based on logging type @param logging type can be write ahead logging or write behind logging
FrontendLogger *FrontendLogger::GetFrontendLogger(LoggingType logging_type) {
  FrontendLogger *frontend_logger = nullptr;
  if (IsBasedOnWriteAheadLogging(logging_type) == true) {
    frontend_logger = new WriteAheadFrontendLogger();
  } else if (IsBasedOnWriteBehindLogging(logging_type) == true) {
    frontend_logger = new WriteBehindFrontendLogger();
  } else {
    LOG_ERROR("Unsupported logging type");
  }
  return frontend_logger;
}
FrontendLogger * FrontendLogger :: GetFrontendLogger ( LoggingType logging_type ) { FrontendLogger * frontend_logger = nullptr ; if ( IsBasedOnWriteAheadLogging ( logging_type ) == true ) { frontend_logger = new WriteAheadFrontendLogger ( ) ; } else if ( IsBasedOnWriteBehindLogging ( logging_type ) == true ) { frontend_logger = new WriteBehindFrontendLogger ( ) ; } else { LOG_ERROR ( " " ) ; } return frontend_logger ; }
@brief Return the frontend logger based on logging type
 @param logging type can be write ahead logging or write behind logging
@brief Return the frontend logger based on logging type @param logging type can be write ahead logging or write behind logging