Enhancement of substituteString() and all log functions