I'm sure there's a way to do it with a custom element, but my suggestion would be, why don't you do it the other way around. Parse the log to retrieve exactly what you want as all the information is there. You could use perl or python to parse the logs and give it to you in any format you would like. To me this seems much easier and extensible than the approach you're taking.
Are you getting this error “Installer User Interface Mode Not Supported. The installer cannot run in this UI mode. To specify the interface mode, use the -i command-line option, followed by the UI mode identifier. The value UI mode identifiers...
The below trick might come handy when you have to add a new node to a cluster but you don't have or is unsure of the security password for the publisher. This procedure has been around for ages.
1) Login into the CLI of the Publisher.