Easy logging switch between debug/release versions



광고 한번만 클릭 부탁드립니다^^
위에 냐옹이 말구~ 위에 배너요~^_^/ 


포스팅을 보시는 분들을 위해 노력 하는 블로거를 위하여! 부탁드립니다. 재미 삼아 포스팅을 정리하지만, 광고를 달아보았습니다. 얼마나 열심히 할 수 있을지...의문이지만요^^ 

Subject Easy logging switch between debug/release versions

최종수정일 : 2012.01.17

안녕하세요~^^

by 퓨림노

글을 작성하겠습니다.

Debug version of Config.java:

package com.test;
public class Config {
  public static final boolean D = true;
  public static final boolean V = true;
}

Release version of Config.java:

package com.test;
public class Config {
  public static final boolean D = false;
  public static final boolean V = false;
}

The build script can select one of them to build debug or release version.

In a class that wants to use the switch:

import static com.test.Config.D;

...
   if (D) Log.d(TAG, ...);



Reference
http://www.androidsnippets.com/easy-logging-switch-between-debugrelease-versions  

'Mobile > android' 카테고리의 다른 글

[android] JSON parsing  (0) 2012.02.21
[Android] JNI 에서 조심해야 할 사항! (unsatisfiedlinkerror)  (1) 2012.01.18
[Android] AssetManager  (0) 2012.01.16
[android openAL] OpenAL 정리  (0) 2012.01.15
Android Camera Resolution  (0) 2011.12.30

댓글

Designed by JB FACTORY