本文整理了Java中com.orhanobut.logger.Logger.init()
方法的一些代码示例,展示了Logger.init()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.init()
方法的具体详情如下:
包路径:com.orhanobut.logger.Logger
类名称:Logger
方法名:init
暂无
代码示例来源:origin: jaydenxiao2016/AndroidFire
/**
* 在application调用初始化
*/
public static void logInit(boolean debug) {
DEBUG_ENABLE=debug;
if (DEBUG_ENABLE) {
Logger.init(AppConfig.DEBUG_TAG) // default PRETTYLOGGER or use just init()
.methodCount(2) // default 2
.logLevel(LogLevel.FULL) // default LogLevel.FULL
.methodOffset(0); // default 0
} else {
Logger.init() // default PRETTYLOGGER or use just init()
.methodCount(3) // default 2
.hideThreadInfo() // default shown
.logLevel(LogLevel.NONE) // default LogLevel.FULL
.methodOffset(2);
}
}
public static void logd(String tag,String message) {
代码示例来源:origin: Rukey7/MvpApp
/**
* 初始化配置
*/
private void _initConfig() {
if (BuildConfig.DEBUG) {
LeakCanary.install(getApplication());
Logger.init("LogTAG");
}
CrashHandler.getInstance().init(getApplication());
RetrofitService.init();
ToastUtils.init(getApplication());
DownloaderWrapper.init(mRxBus, mDaoSession.getVideoInfoDao());
FileDownloader.init(getApplication());
DownloadConfig config = new DownloadConfig.Builder()
.setDownloadDir(PreferencesUtils.getSavePath(getApplication()) + File.separator + "video/").build();
FileDownloader.setConfig(config);
}
}
代码示例来源:origin: dongjunkun/GanK
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
Logger.init("hhh")
.methodOffset(2)
.methodCount(2)
.hideThreadInfo()
.logLevel(BuildConfig.DEBUG ? LogLevel.FULL : LogLevel.NONE);
}
代码示例来源:origin: mingjunli/GithubApp
/**
* initialize the logger.
*/
public static void init() {
Logger.init(TAG);
}
代码示例来源:origin: gdutxiaoxu/CoordinatorLayoutExample
public static void init(Context context){
Context applicationContext = context.getApplicationContext();
if (applicationContext.getExternalCacheDir() != null && isExistSDCard()) {
cacheDir = applicationContext.getExternalCacheDir().toString();
}
else {
cacheDir = applicationContext.getCacheDir().toString();
}
Logger.init(TAG);
PATH = cacheDir + "/Log";
}
代码示例来源:origin: yaozs/YzsLib
@Override
protected void onInitCreate() {
//初始化Toast
ToastUtils.init(true);
Logger.init(TAG);
// Normal app init code...
}
}
代码示例来源:origin: androidmalin/RengwuxianRxjava
/**
* 初始化Logger日志输出配置和获取手机尺寸信息
*/
private void initializeLogAndDeviceInfo() {
Logger.init(TAG_FOR_LOGGER).logLevel(LogLevel.FULL);//Use LogLevel.NONE for the release versions.
DeviceInfo.getInstance().initializeScreenInfo(this);
}
代码示例来源:origin: szpnygo/NoWordsChat
public static void i(String tag, String message) {
if (isPrintLog)
return;
Logger.init(tag).methodOffset(METHOD_OFFSET).methodCount(METHOD_COUNT);
Logger.i(message);
}
代码示例来源:origin: szpnygo/NoWordsChat
public static void w(String tag, String message) {
if (isPrintLog)
return;
Logger.init(tag).methodOffset(METHOD_OFFSET).methodCount(METHOD_COUNT);
Logger.w(message);
}
代码示例来源:origin: xiaoyanger0825/LogHttpInfo
/**
* 初始化log工具,在app入口处调用
*
* @param isLogEnable 是否打印log
*/
public static void init(boolean isLogEnable) {
Logger.init("LogHttpInfo")
.hideThreadInfo()
.logLevel(isLogEnable ? LogLevel.FULL : LogLevel.NONE)
.methodOffset(2);
}
代码示例来源:origin: andyiac/githot
private void initLogger() {
Logger.init(LOGGER_TAG) // default PRETTYLOGGER or use just init()
.setMethodCount(4) // default 2
.setLogLevel(LogLevel.FULL) // default LogLevel.FULL
.setMethodOffset(2); // default 0
//.hideThreadInfo() // default shown
}
代码示例来源:origin: huangfangyi/YiChat
public static void wtf(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.wtf(message);
}
代码示例来源:origin: envyfan/AndroidReview
@Override
public void onCreate() {
super.onCreate();
instance = this;
Bmob.initialize(this, ApplicationID);
//初始化Log系统
Logger.init("MyDemo") // default PRETTYLOGGER or use just init()
.setMethodCount(1) // default 2
.hideThreadInfo(); // default shown
//异常捕获收集
// CrashWoodpecker.fly().to(this);
}
代码示例来源:origin: huangfangyi/YiChat
public static void e(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.e(message);
}
代码示例来源:origin: huangfangyi/YiChat
public static void i(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.i(message);
}
代码示例来源:origin: huangfangyi/YiChat
public static void d(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.d(message);
}
代码示例来源:origin: huangfangyi/YiChat
public static void xml(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.xml(message);
}
代码示例来源:origin: huangfangyi/YiChat
public static void v(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.v(message);
}
代码示例来源:origin: huangfangyi/YiChat
public static void w(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.w(message);
}
代码示例来源:origin: huangfangyi/YiChat
public static void json(String tag, String message) {
Logger.init(tag)
.methodCount(METHOD_COUNT)
.logLevel(LOG_LEVEL)
.methodOffset(METHOD_OFFSET);
Logger.json(message);
}
内容来源于网络,如有侵权,请联系作者删除!