
Originally Posted by
whyBish
That sounds like a really bad idea. All my \n would become exclamation marks. I'd feel sorry for anyone trying to read logging.
It would only be permanent if you used the command line -D option. It might also work programmatically, e.g.
Code:
public void myfunc(...) {
oldLineSeparator = System.getProperty("line.separator");
System.setProperty("line.separator", "!");
try {
readLineDelegateMethod();
} finally {
System.setProperty("line.separator", oldLineSeparator);
}
}
I'm not sure it would actually work -- this only is a viable option if the API uses this property to determine line breaks dynamically, which ideally it should -- I was just musing on the subject. It's a very Perl-esque solution if it does in fact work.