1 // Copyright 2015-present 650 Industries. All rights reserved. 2 package host.exp.exponent.analytics 3 4 import android.util.Log 5 import host.exp.exponent.Constants 6 7 // EXpo Log 8 object EXL { 9 private val TAG = EXL::class.java.simpleName 10 11 // Use this for errors that we expect to happen in tests. They will only log it 12 // they occur outside of a test environment. testErrornull13 fun testError(e: Throwable) { 14 if (!Constants.isTest()) { 15 e.printStackTrace() 16 } 17 } 18 dnull19 @JvmStatic fun d(tag: String?, msg: String) { 20 Log.d(tag, msg) 21 } 22 wnull23 @JvmStatic fun w(tag: String?, msg: String) { 24 Log.w(tag, msg) 25 } 26 27 // TODO send string version of Throwable to Amplitude enull28 @JvmStatic fun e(tag: String?, e: Throwable) { 29 Log.e(tag, e.toString()) 30 } 31 enull32 @JvmStatic fun e(tag: String?, msg: String?) { 33 Log.e(tag, msg ?: "") 34 } 35 } 36