Created
September 12, 2017 07:51
-
-
Save Iyemon-018/c0cf583afd99f2eef6f22ff6e87d5449 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mc.sample.timbersample.Logs; | |
import timber.log.Timber; | |
/** | |
* アプリケーション固有のログ出力機能クラスです。 | |
*.このように、基本的にログの出力機構をラップして作成する。 | |
*/ | |
public class Logger { | |
/** | |
* 初期化処理を実施します。 | |
* @remarks 実行モードによって出力方式を調節します。 | |
* 例えばデバッグモード専用のログであればコンソールに出力し、 | |
* リリースモードであればファイルに出力するようのツリー機能を設定するなど、 | |
*/ | |
public static void initialize() { | |
Timber.plant(new OriginalTree()); | |
} | |
public static void d(String message, Object... args) { | |
Timber.d(message, args); | |
} | |
public static void i(String message, Object... args) { | |
Timber.i(message, args); | |
} | |
public static void w(String message, Object... args) { | |
Timber.w(message, args); | |
} | |
public static void e(String message, Object... args) { | |
Timber.e(message, args); | |
} | |
public static void e(Throwable t ,String message, Object... args) { | |
Timber.e(t, message, args); | |
} | |
public static void wtf(Throwable t, String message, Object... args) { | |
Timber.wtf(t, message, args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment