目录(?)
[-]
一、看效果
二、添加
<code class="language-java hljs has-numbering">compile <span class="hljs-string">'com.orhanobut:logger:1.8'</span></code><ul class="pre-numbering" style="opacity: 0.138694;"><li>1</li></ul><div class="save_code tracking-ad" style="display: none;" data-mod="popu_249"><a target=_blank href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets_01.png" alt="" /></a></div><ul class="pre-numbering"><li>1</li></ul>
三、使用方法
在自定义Application的onCreate方法中
<code class="language-java hljs has-numbering">Logger.init(YOUR_TAG);</code><ul class="pre-numbering" style="opacity: 0.138694;"><li>1</li></ul><div class="save_code tracking-ad" style="display: none;" data-mod="popu_249"><a target=_blank href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets_01.png" alt="" /></a></div><ul class="pre-numbering"><li>1</li></ul>
调用
<code class="language-java hljs has-numbering">Logger.d(<span class="hljs-string">"hello"</span>); Logger.e(<span class="hljs-string">"hello"</span>); Logger.w(<span class="hljs-string">"hello"</span>); Logger.v(<span class="hljs-string">"hello"</span>); Logger.wtf(<span class="hljs-string">"hello"</span>); Logger.json(JSON_CONTENT);<span class="hljs-comment">//支持了Json哦</span> Logger.xml(XML_CONTENT);<span class="hljs-comment">//支持XML</span></code><ul class="pre-numbering" style="opacity: 0.138694;"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li></ul><div class="save_code tracking-ad" style="display: none;" data-mod="popu_249"><a target=_blank href="javascript:;" target="_blank"><img src="http://static.blog.csdn.net/images/save_snippets.png" alt="" /></a></div><ul class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li></ul>
四、android studio的logcat颜色配置
请看我的这篇Blog | 点击这里
五、github地址
欢迎Star | github