LOG and RAW are 100% not related in any way. LOG is simply a picture profile or gamma curve that is applied to the picture after it hits the sensor, but before it has another curve or picture profile stacked on it. It’s created on cameras that don’t shoot higher-tier codecs (like RAW) in an effort to smash as much tonal data (shadows and highlights) into the image. This means you have more flexibility in post-production to push around the image and get the look you are going for. It doesn’t work very well on weaker cameras that shoot 8bit such as entry-level mirrorless, older DSLRs or basically 90% of anything that Sony makes. It pretty much requires 10bit to properly use or you’ll get color banding, artifacting, pixelation and just an overall lack of true control in genral. LOG has nothing to do with the color of the image (only that you get a “flat” or gray looking image). When you grade LOG you are esentially breaking the image itself which is why you actually need more color data to work with for it to properly be utilized (hence 10bit vs 8bit).
RAW is just 1s and 0s inside the camera that hit the sensor and are turned into metadata. Your camera instead of transmitting the image and turning into a compressed image / video file it instead just takes that metadata and leaves it open for editing. Instead of “burning in” the image options like white balance, ISO, color profile, picture profile, etc into the image it’s just a field that your editing program will take a look at and go “oh ok, I need to apply this white balance to the image!“. This esssentially offloads all the processing that would normally happen inside of the camera onto your editing machine. For the editor this means they can change all these settings in post, update the color profile itself, change the image profile in post, adjust exposure in post, denoise after the fact, etc. RAW also has nothing to do with color data, but for all intensive purposeses RAW is almost always 12bit (if not 16bit), but there are flavors of RAW that are 8bit or 10bit.