Skip to content

Commit

Permalink
updated logging statements with level check to avoid uneccessary stri…
Browse files Browse the repository at this point in the history
…ng concatenation.
  • Loading branch information
zznate committed Jun 26, 2013
1 parent f4ad436 commit 0a48c9c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/com/bloidonia/vertx/mods/JdbcProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ public void stop() {
public void handle( final Message<JsonObject> message ) {
String action = message.body().getString( "action" ) ;
requests.mark() ;
logger.debug( "** HANDLE ** " + this.toString() + " (main handler) RECEIVED CALL " + action ) ;
if ( logger.isDebugEnabled() ) {
logger.debug( "** HANDLE ** " + this.toString() + " (main handler) RECEIVED CALL " + action ) ;
}
if( action == null ) {
sendError( message, "action must be specified" ) ;
}
Expand Down Expand Up @@ -457,7 +459,9 @@ private class TransactionalHandler implements Handler<Message<JsonObject>> {
public void handle( Message<JsonObject> message ) {
vertx.cancelTimer( timerId ) ;
String action = message.body().getString( "action" ) ;
logger.debug( "** HANDLE ** " + this.toString() + " (TRANSACTION handler) RECEIVED CALL " + action ) ;
if ( logger.isDebugEnabled() ) {
logger.debug( "** HANDLE ** " + this.toString() + " (TRANSACTION handler) RECEIVED CALL " + action ) ;
}
if( action == null ) {
sendError( message, "action must be specified" ) ;
}
Expand Down Expand Up @@ -589,7 +593,9 @@ void store( ArrayList<Map<String,Object>> result,
}

public void handle( final Message<JsonObject> message ) {
logger.debug( "** HANDLE ** " + this.toString() + " (BATCH handler) RECEIVED CALL" ) ;
if ( logger.isDebugEnabled() ) {
logger.debug( "** HANDLE ** " + this.toString() + " (BATCH handler) RECEIVED CALL" ) ;
}
if( timerId != -1 ) {
vertx.cancelTimer( timerId ) ;
}
Expand Down

0 comments on commit 0a48c9c

Please sign in to comment.