Structural Search - Finding logging statements without 'code guards'

Is it possible to use structural search to find logging statements that are not enclosed inside a specific conditional block?

For example , I would like to find lines of

//ATG Dynamo logging
logDebug(not a constant string)
//log4j
logger.debug(not a constant string)
//commons-logging
log.debug(not a constant string)

that are *not inside an if *statement

//ATG
if(isLoggingDebug())...
//log4j
if(logger.isDebugEnabled())
//commons-logging
if(log.isDebugEnabled())

0
3 comments
Avatar
Permanently deleted user

Not in Selena version :(

Dave Levitt wrote:

Is it possible to use structural search to find logging statements that are not enclosed inside a specific conditional block?

For example , I would like to find lines of

//ATG Dynamo logging
logDebug(not a constant string)
//log4j
logger.debug(not a constant string)
//commons-logging
log.debug(not a constant string)

that are *not inside an if *statement

//ATG
if(isLoggingDebug())...
//log4j
if(logger.isDebugEnabled())
//commons-logging
if(log.isDebugEnabled())



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Time to put a feature request in to Jira :-/

0

Please sign in to leave a comment.