Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added rest of log wrapper classes and package-info.java
- Loading branch information
Showing
4 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
bin/ | ||
local.properties | ||
/local.properties | ||
/local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.mobilebytes.andlog; | ||
|
||
import android.opengl.GLSurfaceView; | ||
import android.opengl.GLSurfaceView.GLWrapper; | ||
import android.util.Log; | ||
|
||
//TODO: Auto-generated Javadoc | ||
/** | ||
* The Class GLLogger. | ||
* | ||
* @author fredgrott | ||
*/ | ||
public class GLLogger { | ||
/** | ||
* Gl debug. | ||
* | ||
* @param gl | ||
* the gl | ||
* @param glWrapper | ||
* the gl wrapper | ||
* @param debugFlags | ||
* the debug flags | ||
* @param logTag | ||
* the lO g_ tag | ||
*/ | ||
public final void glDebug(GLSurfaceView gl, | ||
GLWrapper glWrapper, int debugFlags, String logTag) { | ||
if (Log.isLoggable(logTag, Log.DEBUG)) { | ||
gl.setGLWrapper(glWrapper); | ||
gl.setDebugFlags(debugFlags); | ||
|
||
} else { | ||
CustomLogger.i(logTag, "Log.d not enabled"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.mobilebytes.andlog; | ||
|
||
//TODO: Auto-generated Javadoc | ||
/** | ||
* The Class PerfLogger. | ||
* | ||
* @author fredgrott | ||
*/ | ||
public class PerfLogger { | ||
/** The Constant MILLISECONDSPERSECOND. */ | ||
private static final int MILLISECONDSPERSECOND = 1000; | ||
/** The start time. */ | ||
private static long startTime = 0; | ||
|
||
/** | ||
* Start. | ||
* | ||
* @param tagName | ||
* the tag name | ||
*/ | ||
public static void start(String tagName) { | ||
startTime = System.currentTimeMillis(); | ||
CustomLogger.d(tagName, "started PerfLogger"); | ||
} | ||
|
||
/** | ||
* Stop. | ||
* | ||
* @param tagName | ||
* the tag name | ||
*/ | ||
public static void stop(String tagName) { | ||
double d = (System.currentTimeMillis() - startTime) | ||
/ MILLISECONDSPERSECOND; | ||
CustomLogger.d(tagName, "Fine PerfTrace\nTag: " + tagName | ||
+ "\nTime spent: " + d + " s."); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Log wrapper containing CustomLogger, GLLogger, and PerfLogger. | ||
* @author fredgrott | ||
* @since Android 1.5 | ||
*/ | ||
package com.mobilebytes.andlog; |