Turn off the gas supply to the fireplace at the fireplace line’s shutoff valve with a wrench. Remove the ceramic gas fire logs from the gas log set one by one and discard them. Remove the bottom grate of the log set to expose the gas burner. Use the wrench to disconnect the flexible gas line of the burner from the supply line that comes into the fireplace at the wall. Remove the burner and discard it. Clean any dust, ash and debris from the fireplace with a brush and dustpan. Vacuum out the entire fireplace.
Apply pipe sealing tape to the threads of the exposed fireplace gas line, screw on the cap and tighten it with the wrench. Turn on the gas and spray soap solution onto the cap. If no bubbles appear, the cap is tight. Turn the fireplace gas line shutoff valve to the "Off" position and leave it there. Close the damper at the bottom of the masonry fireplace chimney and install a cap to seal off the chimney top.
Measure your fireplace. Buy an electric fire log set of the suitable size and style. Assemble the electric fire log set and place it in the masonry fireplace per the manufacturer's instructions. Most electric fire log sets simply rest in the masonry fireplace. Plug the fire log set into a 15-amp grounded electrical outlet.