use class.getSimpleName() rather than getName for logging

This commit is contained in:
Eric House 2016-07-13 09:07:48 -07:00
parent dd96c1a5c2
commit a375aed0fa
5 changed files with 29 additions and 17 deletions

View file

@ -245,7 +245,8 @@ public class DelegateBase implements DlgClickNotify,
{ {
int[] containerDims = getContainerDims( new int[2] ); int[] containerDims = getContainerDims( new int[2] );
boolean result = containerDims[0] < containerDims[1]; boolean result = containerDims[0] < containerDims[1];
DbgUtils.logdf( "%s.isPortrait() => %b", getClass().getName(), result ); DbgUtils.logdf( "%s.isPortrait() => %b",
getClass().getSimpleName(), result );
return result; return result;
} }
@ -260,7 +261,7 @@ public class DelegateBase implements DlgClickNotify,
outDims[1] = rect.height(); outDims[1] = rect.height();
} }
DbgUtils.logdf( "%s.getContainerDims(): width => %d, height => %d", DbgUtils.logdf( "%s.getContainerDims(): width => %d, height => %d",
getClass().getName(), outDims[0], outDims[1] ); getClass().getSimpleName(), outDims[0], outDims[1] );
return outDims; return outDims;
} }

View file

@ -1519,7 +1519,7 @@ public class GamesListDelegate extends ListDelegateBase
= (AdapterView.AdapterContextMenuInfo)menuInfo; = (AdapterView.AdapterContextMenuInfo)menuInfo;
View targetView = info.targetView; View targetView = info.targetView;
DbgUtils.logf( "onCreateContextMenu(t=%s)", DbgUtils.logf( "onCreateContextMenu(t=%s)",
targetView.getClass().getName() ); targetView.getClass().getSimpleName() );
if ( targetView instanceof GameListItem ) { if ( targetView instanceof GameListItem ) {
item = (GameListItem)targetView; item = (GameListItem)targetView;
id = R.menu.games_list_game_menu; id = R.menu.games_list_game_menu;

View file

@ -43,7 +43,8 @@ public class XWActivity extends FragmentActivity implements Delegator {
protected void onCreate( Bundle savedInstanceState, DelegateBase dlgt ) protected void onCreate( Bundle savedInstanceState, DelegateBase dlgt )
{ {
if ( XWApp.LOG_LIFECYLE ) { if ( XWApp.LOG_LIFECYLE ) {
DbgUtils.logf( "%s.onCreate(this=%H)", getClass().getName(), this ); DbgUtils.logf( "%s.onCreate(this=%H)",
getClass().getSimpleName(), this );
} }
super.onCreate( savedInstanceState ); super.onCreate( savedInstanceState );
m_dlgt = dlgt; m_dlgt = dlgt;
@ -67,7 +68,8 @@ public class XWActivity extends FragmentActivity implements Delegator {
protected void onPause() protected void onPause()
{ {
if ( XWApp.LOG_LIFECYLE ) { if ( XWApp.LOG_LIFECYLE ) {
DbgUtils.logf( "%s.onPause(this=%H)", getClass().getName(), this ); DbgUtils.logf( "%s.onPause(this=%H)",
getClass().getSimpleName(), this );
} }
m_dlgt.onPause(); m_dlgt.onPause();
super.onPause(); super.onPause();
@ -77,7 +79,8 @@ public class XWActivity extends FragmentActivity implements Delegator {
protected void onResume() protected void onResume()
{ {
if ( XWApp.LOG_LIFECYLE ) { if ( XWApp.LOG_LIFECYLE ) {
DbgUtils.logf( "%s.onResume(this=%H)", getClass().getName(), this ); DbgUtils.logf( "%s.onResume(this=%H)",
getClass().getSimpleName(), this );
} }
super.onResume(); super.onResume();
m_dlgt.onResume(); m_dlgt.onResume();
@ -87,7 +90,8 @@ public class XWActivity extends FragmentActivity implements Delegator {
protected void onStart() protected void onStart()
{ {
if ( XWApp.LOG_LIFECYLE ) { if ( XWApp.LOG_LIFECYLE ) {
DbgUtils.logf( "%s.onStart(this=%H)", getClass().getName(), this ); DbgUtils.logf( "%s.onStart(this=%H)",
getClass().getSimpleName(), this );
} }
super.onStart(); super.onStart();
m_dlgt.onStart(); m_dlgt.onStart();
@ -97,7 +101,8 @@ public class XWActivity extends FragmentActivity implements Delegator {
protected void onStop() protected void onStop()
{ {
if ( XWApp.LOG_LIFECYLE ) { if ( XWApp.LOG_LIFECYLE ) {
DbgUtils.logf( "%s.onStop(this=%H)", getClass().getName(), this ); DbgUtils.logf( "%s.onStop(this=%H)",
getClass().getSimpleName(), this );
} }
m_dlgt.onStop(); m_dlgt.onStop();
super.onStop(); super.onStop();
@ -107,7 +112,8 @@ public class XWActivity extends FragmentActivity implements Delegator {
protected void onDestroy() protected void onDestroy()
{ {
if ( XWApp.LOG_LIFECYLE ) { if ( XWApp.LOG_LIFECYLE ) {
DbgUtils.logf( "%s.onDestroy(this=%H)", getClass().getName(), this ); DbgUtils.logf( "%s.onDestroy(this=%H)",
getClass().getSimpleName(), this );
} }
m_dlgt.onDestroy(); m_dlgt.onDestroy();
super.onDestroy(); super.onDestroy();

View file

@ -49,7 +49,7 @@ public class XWFragment extends Fragment
protected void onCreate( DelegateBase dlgt, Bundle sis ) protected void onCreate( DelegateBase dlgt, Bundle sis )
{ {
DbgUtils.logdf( "%s.onCreate() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onCreate() called", this.getClass().getSimpleName() );
super.onCreate( sis ); super.onCreate( sis );
m_dlgt = dlgt; m_dlgt = dlgt;
} }
@ -58,14 +58,15 @@ public class XWFragment extends Fragment
public View onCreateView( LayoutInflater inflater, ViewGroup container, public View onCreateView( LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState ) Bundle savedInstanceState )
{ {
DbgUtils.logdf( "%s.onCreateView() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onCreateView() called", this.getClass().getSimpleName() );
return m_dlgt.inflateView( inflater, container ); return m_dlgt.inflateView( inflater, container );
} }
@Override @Override
public void onActivityCreated( Bundle savedInstanceState ) public void onActivityCreated( Bundle savedInstanceState )
{ {
DbgUtils.logdf( "%s.onActivityCreated() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onActivityCreated() called",
this.getClass().getSimpleName() );
m_dlgt.init( savedInstanceState ); m_dlgt.init( savedInstanceState );
super.onActivityCreated( savedInstanceState ); super.onActivityCreated( savedInstanceState );
if ( m_hasOptionsMenu ) { if ( m_hasOptionsMenu ) {
@ -76,7 +77,8 @@ public class XWFragment extends Fragment
@Override @Override
public void onPause() public void onPause()
{ {
DbgUtils.logdf( "%s.onPause() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onPause() called",
this.getClass().getSimpleName() );
m_dlgt.onPause(); m_dlgt.onPause();
super.onPause(); super.onPause();
} }
@ -91,7 +93,8 @@ public class XWFragment extends Fragment
@Override @Override
public void onStart() public void onStart()
{ {
DbgUtils.logdf( "%s.onStart() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onStart() called",
this.getClass().getSimpleName() );
super.onStart(); super.onStart();
m_dlgt.onStart(); m_dlgt.onStart();
} }
@ -99,7 +102,8 @@ public class XWFragment extends Fragment
@Override @Override
public void onStop() public void onStop()
{ {
DbgUtils.logdf( "%s.onStop() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onStop() called",
this.getClass().getSimpleName() );
m_dlgt.onStop(); m_dlgt.onStop();
super.onStop(); super.onStop();
} }
@ -107,7 +111,8 @@ public class XWFragment extends Fragment
@Override @Override
public void onDestroy() public void onDestroy()
{ {
DbgUtils.logdf( "%s.onDestroy() called", this.getClass().getName() ); DbgUtils.logdf( "%s.onDestroy() called",
this.getClass().getSimpleName() );
m_dlgt.onDestroy(); m_dlgt.onDestroy();
super.onDestroy(); super.onDestroy();
} }

View file

@ -193,7 +193,7 @@ public class LocUtils {
// DbgUtils.logf( "xlateView(%s, %s)", context.getClass().getName(), // DbgUtils.logf( "xlateView(%s, %s)", context.getClass().getName(),
// view.getClass().getName() ); // view.getClass().getName() );
if ( XWApp.LOCUTILS_ENABLED ) { if ( XWApp.LOCUTILS_ENABLED ) {
xlateView( context, context.getClass().getName(), view, 0 ); xlateView( context, context.getClass().getSimpleName(), view, 0 );
} }
} }