Implement class Pattern for formatting messages.