Android Timber 学习

news/2024/7/7 10:42:47

1.AS中添加依赖项

   implementation "com.jakewharton.timber:timber:4.5.1"

2.OnCreate中注册

if (BuildConfig.DEBUG) {
            Timber.plant(new Timber.DebugTree());
} else {
            Timber.plant(new CrashReportingTree());
}

添加类

private static class CrashReportingTree extends Timber.Tree {
        @Override
        protected void log(int priority, String tag, String message, Throwable t) {

    }
}

3.使用过程

Timber.tag("activityName");
Timber.e("Activity Created");

参考文章:
1. https://blog.csdn.net/u011376022/article/details/60575632
2. https://www.jianshu.com/p/4f54fcba3ad3


http://www.niftyadmin.cn/n/1390314.html

相关文章

Zabbix代理proxy架构搭建

众所周知,Zabbix是一个基于Web界面的提供分布式系统监视以及网络监视功能的企业级开源解决方案。Zabbix能监视各种网络尝试,保证服务器系统的安全运营;并提供灵活的通知机制以让系统工程师快速定位/解决存在的问题。当我们的监控的服务器增多…

LINUX-vbird

http://www.linux.org.tw/ftp://ftp.nsysu.edu.tw/服务器:NAT:SAMBA:Mail:Web:DHCP:Proxy:FTP基本指令显示日期的指令:date显示日历的指令:calcal [month] [year]简单好用的计算器:bcbc默认仅输出整数,如果要输出小数点…

代码设置SPList权限(添加SPGroup)

使用代码为SPList添加用户组&#xff0c;并且设置用户组的权限 代码实现 using (SPSite mySPSite new SPSite(<SPSiteURL>)) { SPWeb mySPWeb mySPSite.RootWeb; string spGroupName1 "mySPGroup1"; //添加的用户必须是Domain中存在的用户 string spUserNa…

Android lombok 学习

下面说一下我写demo过程中的处理过程&#xff08;可能与网络其他的有些不同&#xff09; 1.AS中安装插件 在Android Studio下&#xff0c;进入setting->Plugins &#xff0c;右侧搜索Lombok&#xff0c;然后点击安装&#xff0c;重启Android Studio 2.添加依赖项 compile…

打造移动终端的 WebApp(一):搭建一个舞台

最近随着 Apple iOS 和 Android 平台的盛行&#xff0c;一个新的名词 WebApp 也逐渐火了起来&#xff0c;这里我也趁着热潮做一个关于 WebApp 系列的学习笔记&#xff0c;分享平时的一些研究以及项目中的经验&#xff0c;在现阶段研究对象暂时限定为 iOS 平台(iPhone/iPad/iPod…

Win2016 Nano Server安装

微软在最新的Windows Server 2016中带来一个全新的Nano Server选项。微软称&#xff0c;Nano Server将成为下一代云基础设施和应用程序的核心。深度重构的Nano Server将特别专注于云基础设施、云应用程序以及容器。另外&#xff0c;Nano Server平台的角色和可选功能都将通过外部…

Directx 3D编程实例:随机绘制的立体图案旋转

最近朋友建议我写一些关于微软云技术的博客留给学校下一届的学生们看&#xff0c;怕下一届的MSTC断档。于是我也觉的有这个必要。 写了几篇博客之后&#xff0c;我觉得也有必要把这一年的学习内容放在博客做个纪念&#xff0c;就这样写了本篇博客。 第一步&#xff1a;修改Prog…

Android ConnectivityManager学习

1.设置权限 <uses-permission android:name"android.permission.ACCESS_NETWORK_STATE"/><uses-permission android:name"android.permission.INTERNET"/> 2.获取网络服务 ConnectivityManager cm (ConnectivityManager) getSystemService(C…