The thermocouple is an electrical component in the gas log used to open the gas valve when the pilot light is lit. When your gas fireplace does not come on when the pilot light is lit, you may have a bad thermocouple. A thermocouple that prematurely cools will also cause the gas log to shut off earlier than expected. Do-it-yourselfers can replace the thermocouple.
Turn the shutoff valve for the gas line to the gas log to the left or counterclockwise to close the valve. Wait at least 30 minutes for the thermocouple to cool down.
Remove the two hex nuts used to secure the wires for the thermocouple with the nut driver. If your gas log secures the wires with screws, use a screwdriver.
Grab the thermocouple with the needle-nose pliers and pull it out of the gas log. Set the old thermocouple aside on the brick of the fireplace in case it is still hot.
Wipe dirt and grime off the terminals for the thermocouple wires on the gas log with a damp cloth or rag and rubbing alcohol.
Insert the new thermocouple into the gas log and secure the wires to the terminals with the nut driver or screwdriver.