From cfa101350a6e357d3ee8126035c688222e12b8dc 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 c7c24a3dc..c36156fc4 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();