Unfortunately you'll need to rebuild rcl. rcl picks the logger to use at compile time, which by default is rcl_logging_spdlog.
Add rcl_logging_log4cxx and rcl to your workspace, then choose the logging implementation by setting the environment variable RCL_LOGGING_IMPLEMENTATION.
export RCL_LOGGING_IMPLEMENTATION=rcl_logging_log4cxx