* added new version of opensrf2 that has parseable log output,
authorkenstir <kenstir@gmail.com>
Mon, 12 Oct 2015 22:50:04 +0000 (18:50 -0400)
committerkenstir <kenstir@gmail.com>
Mon, 12 Oct 2015 22:50:04 +0000 (18:50 -0400)
  and a perl script to parse it.  This is for my osrf debugging.

Open-ILS/src/Android/core/libs/opensrf2_android.jar
Open-ILS/src/Android/kenstir_copy_osrf_jar.sh [new file with mode: 0644]
Open-ILS/src/Android/kenstir_parse_logcat.pl [new file with mode: 0644]

index 0c91332..71af946 100644 (file)
Binary files a/Open-ILS/src/Android/core/libs/opensrf2_android.jar and b/Open-ILS/src/Android/core/libs/opensrf2_android.jar differ
diff --git a/Open-ILS/src/Android/kenstir_copy_osrf_jar.sh b/Open-ILS/src/Android/kenstir_copy_osrf_jar.sh
new file mode 100644 (file)
index 0000000..5c40976
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/bash
+cp -p ../../../../opensrf2_serialized_reg/out/artifacts/jar/opensrf2_android.jar core/libs
diff --git a/Open-ILS/src/Android/kenstir_parse_logcat.pl b/Open-ILS/src/Android/kenstir_parse_logcat.pl
new file mode 100644 (file)
index 0000000..d8aaba6
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+#
+# debug helper for evergreen app
+#
+# get output from logcat and parse the OSRF JSON output and print it
+
+use strict;
+use warnings;
+use Data::Dumper;
+use JSON;
+
+my $logcat = `adb logcat -d`;
+my @lines = split(/\n/, $logcat);
+foreach my $line (@lines) {
+    if ($line =~ /org.opensrf.net.http.GatewayRequest.*service:(\S+) method:(\S+) result:(.*)/) {
+        my($svc,$method,$json) = ($1,$2,$3);
+        my $obj = decode_json($json);
+        print "$method $svc -> ", Dumper($obj);
+    }
+}