File tree Expand file tree Collapse file tree 4 files changed +82
-3
lines changed
core/logger/src/main/java/com/depromeet/team5/core/logger Expand file tree Collapse file tree 4 files changed +82
-3
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "project_info" : {
3
+ "project_number" : " 335081118627" ,
4
+ "project_id" : " hedge-dev" ,
5
+ "storage_bucket" : " hedge-dev.firebasestorage.app"
6
+ },
7
+ "client" : [
8
+ {
9
+ "client_info" : {
10
+ "mobilesdk_app_id" : " 1:335081118627:android:bed242ec9849531fcd9816" ,
11
+ "android_client_info" : {
12
+ "package_name" : " com.depromeet.team5.dev"
13
+ }
14
+ },
15
+ "oauth_client" : [],
16
+ "api_key" : [
17
+ {
18
+ "current_key" : " AIzaSyAoTUUJLvUN4G4UuA3l-GPBoa6ozjNjZHI"
19
+ }
20
+ ],
21
+ "services" : {
22
+ "appinvite_service" : {
23
+ "other_platform_oauth_client" : []
24
+ }
25
+ }
26
+ }
27
+ ],
28
+ "configuration_version" : " 1"
29
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "project_info" : {
3
+ "project_number" : " 858813075589" ,
4
+ "project_id" : " hedge-ac61a" ,
5
+ "storage_bucket" : " hedge-ac61a.firebasestorage.app"
6
+ },
7
+ "client" : [
8
+ {
9
+ "client_info" : {
10
+ "mobilesdk_app_id" : " 1:858813075589:android:7c9b5873f48f65ea6a59ec" ,
11
+ "android_client_info" : {
12
+ "package_name" : " com.depromeet.team5"
13
+ }
14
+ },
15
+ "oauth_client" : [],
16
+ "api_key" : [
17
+ {
18
+ "current_key" : " AIzaSyAS2lqctbXDHMFP_eYdG7qQ-e6L651tl98"
19
+ }
20
+ ],
21
+ "services" : {
22
+ "appinvite_service" : {
23
+ "other_platform_oauth_client" : []
24
+ }
25
+ }
26
+ }
27
+ ],
28
+ "configuration_version" : " 1"
29
+ }
Original file line number Diff line number Diff line change
1
+ package com.depromeet.team5.core.logger
2
+
3
+ import android.util.Log
4
+ import com.google.firebase.crashlytics.FirebaseCrashlytics
5
+ import timber.log.Timber
6
+
7
+ class CrashlyticsTree : Timber .Tree () {
8
+
9
+ override fun log (
10
+ priority : Int ,
11
+ tag : String? ,
12
+ message : String ,
13
+ t : Throwable ?
14
+ ) {
15
+ if (priority == Log .VERBOSE || priority == Log .DEBUG ) {
16
+ return ;
17
+ }
18
+
19
+ if (t != null && priority == Log .ERROR ) {
20
+ FirebaseCrashlytics .getInstance().recordException(t)
21
+ }
22
+ }
23
+ }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ internal class LoggerImpl @Inject constructor(
16
16
override fun plant (variant : BuildVariant ) {
17
17
when (variant) {
18
18
BuildVariant .DEBUG -> Timber .plant(Timber .DebugTree ())
19
- BuildVariant .RELEASE -> {} // todo crashlytics와 연결하기
19
+ BuildVariant .RELEASE -> Timber .plant( CrashlyticsTree ())
20
20
}
21
21
}
22
22
@@ -61,8 +61,6 @@ internal class LoggerImpl @Inject constructor(
61
61
}
62
62
63
63
override fun logAndToast (throwable : Throwable ) {
64
- // todo custom throwable을 구분하여 message 받아 처리하기
65
-
66
64
e(throwable)
67
65
68
66
Toast .makeText(
You can’t perform that action at this time.
0 commit comments