Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: contributed awk script for adaptor log processing

...

Code Block
public void appendToResponse(WOResponse aResponse,
                           WOContext aContext) {
  logSQL(true);
  super.appendToResponse(aResponse, aContext);
  logSQL(false);
}

Here is an awk script that takes an a WOApplication log which contains EOAdaptorLog info as input, picks out the SQL statements and their bindings, and spits out a CSV formatted log of those statements, with binding values filled in as literals, along with rowcount and execution time in seconds. Those statements can most of the time be used manually against a database for testing purposes. You need gawk installed for this.

takes an a WOApplication log which contains EOAdaptorLog info as
# input, picks out the SQL statements and their bindings, and spits out a CSV formatted
# log of those statements, with binding values filled in as literals, along
# with rowcount and execution time in seconds. Those statements can most of the time be used
# manually against a database for testing purposes