What comes to replacing the words, why not simply use multiple Replace operations. For example
...
text = text.Replace("INFO", "DEBUG");
text = text.Replace("ERROR", "DEBUG");
text = text.Replace("WARN", "DEBUG");
...
And that comes to the previous state, probably the easiest way is to re-read the file to the variable.