Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
[do_jdbc] format execution time in debug log as fraction of second [#…
Browse files Browse the repository at this point in the history
…981 state:resolved]
  • Loading branch information
rsim committed Jul 20, 2009
1 parent 8f10009 commit 8f076a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion do_jdbc/src/main/java/data_objects/Command.java
Expand Up @@ -11,6 +11,7 @@
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Formatter;

import org.jruby.Ruby;
import org.jruby.RubyArray;
Expand Down Expand Up @@ -721,9 +722,10 @@ private void debug(String logMessage, Long executionTime) {

if (level == 0) {
StringBuffer msgSb = new StringBuffer();
Formatter formatter = new Formatter(msgSb);

if (executionTime != null) {
msgSb.append("(").append(executionTime).append(") ");
formatter.format("(%.3f) ", executionTime / 1000.0);
}

msgSb.append(logMessage);
Expand Down

0 comments on commit 8f076a1

Please sign in to comment.