wjc
2023-07-07 22494af577e21a930abef309f2f60c03c9615bd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package com.hdl.log;
 
import android.content.Context;
 
import com.hdl.log.bean.LogBean;
import com.hdl.log.utils.LogUtil;
 
 
/**
 * Created by hxb on 2023/3/14.
 */
public class HDLLog {
    /**
     * 阿里云日志accessId
     */
    private static String accessId;
    /**
     * 阿里云accessKey
     */
    private static String accessKey;
    /**
     * 项目名
     */
    private static String projectName;
    /**
     * 异常日志库名
     */
    private static String exceptionLog;
    /**
     * 埋点库名
     */
    private static String eventTracking;
 
    private static String endPoint;
 
    private static Context context;
    /**
     * 获取当前Context
     * @return
     */
    public static Context getContext()
    {
        return context;
    }
 
    public static void init(Context context, String endPoint,String accessId, String accessKey, String projectName,String exceptionLog,String eventTracking){
        HDLLog.context=context;
        HDLLog.endPoint=endPoint;
        HDLLog.accessId = accessId;
        HDLLog.accessKey = accessKey;
        HDLLog.projectName = projectName;
        HDLLog.exceptionLog = exceptionLog;
        HDLLog.eventTracking = eventTracking;
    }
 
    public static String getAccessId() {
        return accessId;
    }
 
    public static void setAccessId(String accessId) {
        HDLLog.accessId = accessId;
    }
 
    public static String getAccessKey() {
        return accessKey;
    }
 
    public static void setAccessKey(String accessKey) {
        HDLLog.accessKey = accessKey;
    }
 
    public static String getProjectName() {
        return projectName;
    }
 
    public static void setProjectName(String projectName) {
        HDLLog.projectName = projectName;
    }
 
    public static String getExceptionLog() {
        return exceptionLog;
    }
 
    public static void setExceptionLog(String exceptionLog) {
        HDLLog.exceptionLog = exceptionLog;
    }
 
    public static String getEventTracking() {
        return eventTracking;
    }
 
    public static void setEventTracking(String eventTracking) {
        HDLLog.eventTracking = eventTracking;
    }
 
    public static String getEndPoint() {
        return endPoint;
    }
 
    public static void setEndPoint(String endPoint) {
        HDLLog.endPoint = endPoint;
    }
}