[PATCH imagefactory 16/32] Use a map to do the log replacements.