Monday, December 29th, 2008
Regular Expression to Replace System.out.println with Log4j
This is nothing fancy, but may help some of you log4j newbies.
I found myself replacing a project's hideous System.out.println statements with log4j log calls.
Just do a File Search in eclipse , tick the regular expression box and do a Replace:
Find: System\.out\.println\("(.+?)"\);
Replace: log.info("\1");
Now you just have to go in and add your imports and your log [...]






