From 099337eb3a2710c71a8d7df17bc754acb0de2ce2 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 11 Jul 2015 10:52:00 -0700 Subject: [PATCH] add logdf, logging for DEBUG builds only --- .../XWords4/src/org/eehouse/android/xw4/DbgUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java index 971abf66a..55a9bfbc1 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DbgUtils.java @@ -78,6 +78,14 @@ public class DbgUtils { } } // logf + public static void logdf( String format, Object... args ) + { + if ( s_doLog && BuildConfig.DEBUG ) { + Formatter formatter = new Formatter(); + logf( formatter.format( format, args ).toString() ); + } + } // logdf + public static void showf( Context context, String format, Object... args ) { Formatter formatter = new Formatter();