Creating custom variables during log import


I want to import a custom log format and create custom variables or dimensions for certain custom log fields. However, the documentation seems to be sparse in this regard. Could someone point me to some documentation on how to populate custom variables during log import or give me a quick overview of how this is done?

I understand that creating custom dimensions during log import is not yet supported. However, it looks like you can create custom dimensions in the Action scope by extracting parts of the path or a query parameter. Will this work during log import or just via the tracker?