More flexible log message handling. (Do not merge yet.)
Created by: SkyToGround
So I got around to implementing the suggestion in JIRA ticket DM-828. There is more work required before this should be merged, including unit testing and additional (static) checks on the input parameters. Please, do comment on the new design and tell if you think there is some obvious flaw with it.