NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
itreppert
Joined: 23 Dec 2008 Posts: 45
|
Posted: Wed Apr 25, 2012 11:24 pm Post subject: enclose occurence of LOGGER.log with if(LOGGER.isLoggable(Level.INFO)){.. automatically |
|
|
Hi guys,
is there a way to
enclose every occurence of
with
| Code: | | if(LOGGER.isLoggable(Level.INFO)){.. |
automatically ?
Regards,
Holger |
|
| Back to top |
|
 |
itreppert
Joined: 23 Dec 2008 Posts: 45
|
Posted: Thu Apr 26, 2012 12:32 am Post subject: Solution found |
|
|
Find and Replace as Regex
(LOGGER.log\(Level.(.*), ".*) <---Find
if(LOGGER.isLoggable(Level.$2)){$0} <--- replace with
(LOGGER.info.*)
if(LOGGER.isLoggable(Level.INFO)){$0}
(LOGGER.exiting.*)
if(LOGGER.isLoggable(Level.FINER)){$0}
(LOGGER.entering.*)
if(LOGGER.isLoggable(Level.FINER)){$0}
But be careful not to run this twice
Regards,
Holger |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|