Skip to content

Commit

Permalink
The official version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ssyijiu committed Jan 14, 2017
1 parent 4f01060 commit 467693a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ MLog.e("E","ssyijiu"); // 设置本次打印的TAG
```
## 效果图

![](http://obe5pxv6t.bkt.clouddn.com/MLog_1.png)
![](http://obe5pxv6t.bkt.clouddn.com/MLog-1.png)

![](http://obe5pxv6t.bkt.clouddn.com/MLog_2.png)
![](http://obe5pxv6t.bkt.clouddn.com/MLog-2.png)

##Gradle

Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/ssyijiu/mlog/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ protected void onCreate(Bundle savedInstanceState) {
MLog.w("W","---------------");
MLog.e("E","---------------");
MLog.e("ssyijiu");

}
}
4 changes: 2 additions & 2 deletions library/src/main/java/com/ssyijiu/library/MLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ private static void printLog(String defaultTag, LogLev lev, String msg) {
String tmpTAG = TAG;
TAG = defaultTag;

StackTraceElement[] stackTrace = new Throwable().getStackTrace();
byte index = 8;
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
byte index = 4;
String fileName = stackTrace[index].getFileName();
String className = stackTrace[index].getClassName();
className = className.substring(className.lastIndexOf(".") + 1);
Expand Down

0 comments on commit 467693a

Please sign in to comment.