Would the FMessageLog be what you are looking for?
Seems to be pretty straight forward,
the log messages are displayed when the FMessageLog is destroyed.
{
auto messageLog = FMessageLog("My log name");
messageLog.Open(EMessageSeverity::Info, true);
messageLog.Message(EMessageSeverity::Info, FText::FromString("My error!!!"));
}