Skip to content

Commit

Permalink
Check Assert log level
Browse files Browse the repository at this point in the history
  • Loading branch information
nonelse committed Sep 12, 2016
1 parent cce77b4 commit 24ef848
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Adjust/adjust/src/main/java/com/adjust/sdk/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ public void error(String message, Object... parameters) {

@Override
public void Assert(String message, Object... parameters) {
try {
Log.println(Log.ASSERT, LOGTAG, String.format(Locale.US, message, parameters));
} catch (Exception e) {
Log.e(LOGTAG, String.format(Locale.US, formatErrorMessage, message, Arrays.toString(parameters)));
if(logLevel.androidLogLevel <= Log.ASSERT) {
try {
Log.println(Log.ASSERT, LOGTAG, String.format(Locale.US, message, parameters));
} catch (Exception e) {
Log.e(LOGTAG, String.format(Locale.US, formatErrorMessage, message, Arrays.toString(parameters)));
}
}
}

Expand Down

0 comments on commit 24ef848

Please sign in to comment.