Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use Intellij refactoring to replace "System.out" calls with logging?

A legacy application has 3000+ calls to System.out.

Using Intellij's refactoring tools, how can I (easily) replace calls to "System.out" with a calls to log4j/java.util.logging/etc?

I've poked around the refactoring menu but didn't see any options.

Note: I know i can use 'source code find/replace' , but was curious if the refactoring tools handled this type of usecase

thanks

like image 376
user331465 Avatar asked Jun 15 '15 21:06

user331465


1 Answers

Use Structural Search and Replace

enter image description here

like image 155
Meo Avatar answered Oct 13 '22 01:10

Meo