Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	tedpermission/src/main/java/com/gun0912/tedpermission/util/Dlog.java
  • Loading branch information
gun0912 committed Jul 6, 2016
2 parents 1694383 + 787fdcc commit 635e849
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ repositories {
}

dependencies {
compile 'com.github.ParkSangGwon:TedPermission:v1.0.10'
compile 'com.github.ParkSangGwon:TedPermission:v1.0.11'
}

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

public class Dlog {

static final String TAG = "tedpark";
static final String TAG = "tedpark";

/** Log Level Error **/
public static void e(String message) {

if (BuildConfig.DEBUG) Log.e(TAG, buildLogMsg(message));
}

Expand All @@ -20,13 +19,11 @@ public static void w(String message) {

/** Log Level Information **/
public static void i(String message) {

if (BuildConfig.DEBUG) Log.i(TAG, buildLogMsg(message));
}

/** Log Level Debug **/
public static void d(String message) {

if (BuildConfig.DEBUG) Log.d(TAG, buildLogMsg(message));
}

Expand All @@ -35,19 +32,21 @@ public static void v(String message) {
if (BuildConfig.DEBUG) Log.v(TAG, buildLogMsg(message));
}

public static String buildLogMsg(String message) {
public static String buildLogMsg(String message) {

StackTraceElement ste = Thread.currentThread().getStackTrace()[4];
StackTraceElement ste = Thread.currentThread().getStackTrace()[4];

StringBuilder sb = new StringBuilder();
StringBuilder sb = new StringBuilder();

sb.append("[");
sb.append(ste.getFileName().replace(".java", ""));
sb.append("::");
sb.append(ste.getMethodName());
sb.append("]");
sb.append(message);
sb.append("[");
sb.append(ste.getFileName().replace(".java", ""));
sb.append("::");
sb.append(ste.getMethodName());
sb.append("]");
sb.append(message);

return sb.toString();

}

return sb.toString();
}
}

0 comments on commit 635e849

Please sign in to comment.