Issue #3279740 by mxh: Refactor the Token service so that the LogMessage action also supports replacement of root-level tokens