It is not possible to use the Main Arguments Lookup in the current version. The "main" prefix is not present in the corresponding Interpolator object and thus the resolution of the variable is not working as advertised in the documentation, e.g. using the following variable in the log4j2.xml:
As far as I can tell, the problem seems to stem from the PluginManger.collectPlugins-Method that does not acknowledge the existence of the Main Arguments Lookup.
I'm following the documentation on the website with the following sample log4j2.xml:
...and following code in my application: