forked from nextcloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e625f45
commit 14279f7
Showing
3 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.nmc.android.ui.utils | ||
|
||
import com.owncloud.android.BuildConfig | ||
import com.owncloud.android.lib.common.utils.Log_OC | ||
|
||
/** | ||
* NMC log interpreter class | ||
* this class will be used whenever we have to reduce the logs writing | ||
* this will avoid printing logs in release builds | ||
* todo: can be extended later for more functions | ||
*/ | ||
object Log_NMC { | ||
@JvmStatic | ||
fun v(tag: String?, msg: String?) { | ||
if (BuildConfig.DEBUG) Log_OC.v(tag, msg) | ||
} | ||
|
||
@JvmStatic | ||
fun d(tag: String?, msg: String?) { | ||
if (BuildConfig.DEBUG) Log_OC.d(tag, msg) | ||
} | ||
|
||
@JvmStatic | ||
fun d(tag: String, msg: String, e: Exception) { | ||
if (BuildConfig.DEBUG) Log_OC.d(tag, msg, e) | ||
} | ||
|
||
@JvmStatic | ||
fun i(tag: String?, msg: String?) { | ||
if (BuildConfig.DEBUG) Log_OC.i(tag, msg) | ||
} | ||
|
||
@JvmStatic | ||
fun e(tag: String?, msg: String?) { | ||
if (BuildConfig.DEBUG) Log_OC.e(tag, msg) | ||
} | ||
|
||
@JvmStatic | ||
fun w(tag: String?, msg: String?) { | ||
if (BuildConfig.DEBUG) Log_OC.w(tag, msg) | ||
} | ||
} |
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
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