summaryrefslogtreecommitdiffstats
path: root/logger_service/server/src/ss_logger_error_event_cfg.cpp
blob: ccc6082dc458ac4ba35103356a469529dad5ef09 (plain)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
/*
 * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

///////////////////////////////////////////////////////////////////////////////
/// \ingroup  tag_SS_LoggerService
/// \brief    This file supports error event logging configuration.
///
///////////////////////////////////////////////////////////////////////////////
#include <string.h>
#include <native_service/frameworkunified_framework_if.h>
#include <system_service/ss_logger_service.h>
#include <system_service/ss_services.h>
#include <system_service/ss_templates.h>
#include <vector>
#include "loggerservicedebug_loggerservicelog.h"
#include "ss_logger_error_event_cfg.h"

enum ARTIFACT_BIT {
  ARTIFACT_BIT_NONE = 0x00000000,
  ARTIFACT_BIT_LOGGERSERVICE_DEBUG_LOG = 1 << (UI_32) eArtifactIdInterfaceunifiedDebugLog,
  ARTIFACT_BIT_TRANSMIT_LOG = 1 << (UI_32) eArtifactIdTransmitLog,
  ARTIFACT_BIT_PERFORMANCE_LOG = 1 << (UI_32) eArtifactIdPerformanceLog,
  ARTIFACT_BIT_BOOT_MICRO_LOG = 1 << (UI_32) eArtifactIdBootMicroLog,
  ARTIFACT_BIT_SYSTEM_DATA_LOG = 1 << (UI_32) eArtifactIdSystemDataCsv,
  ARTIFACT_BIT_SHOW_MEM_TXT = 1 << (UI_32) eArtifactIdShowMemTxt,
  ARTIFACT_BIT_PROCESS_CORE = 1 << (UI_32) eArtifactIdProcessCore,
  ARTIFACT_BIT_DEBUG_DUMP_LOG = 1 << (UI_32) eArtifactIdDebugDumpLog,
  ARTIFACT_BIT_KERNEL_LOG = 1 << (UI_32) eArtifactIdKernelLog,
  ARTIFACT_BIT_KERNEL_BOOT_LOG = 1 << (UI_32) eArtifactIdKernelBootLog,
  ARTIFACT_BIT_DRINITIAL_LOG = 1 << (UI_32) eArtifactIdDRInitialLog,
  ARTIFACT_BIT_DRLOCATION_LOG = 1 << (UI_32) eArtifactIdDRLocationLog,
  ARTIFACT_BIT_CHLM_MC_LOGS = 1 << (UI_32) eArtifactIdCpuHighLoadMonteCarloLogs,
  ARTIFACT_BIT_METACORE_LOGS = 1 << (UI_32) eArtifactIdMetaCoreLogs,
  ARTIFACT_BIT_SCREEN_SHOT = 1 << (UI_32) eArtifactIdScreenShot,
  ARTIFACT_BIT_CMS_LOGS = 1 << (UI_32) eArtifactIdCmsLogs,
  ARTIFACT_BIT_INTERNAL_DTC_LOG = 1 << (UI_32) eArtifactIDInternalDTC,
  ARTIFACT_BIT_CLEAR_ALL_LOG = 1 << (UI_32) eArtifactIdClearAllLog,
  ARTIFACT_BIT_NAVI_LOG = 1 << (UI_32) eArtifactIdNaviLog,
  ARTIFACT_BIT_DEBUG_FOLDER_CONTENT = 1
      << (UI_32) eArtifactIdDebugFolderContent,
  ARTIFACT_BIT_DEBUG_FOLDER2_CONTENT = 1
      << (UI_32) eArtifactIdDebugFolder2Content,
  ARTIFACT_BIT_COM_LOG = 1 << (UI_32) eArtifactIdComDebugLog,
  ARTIFACT_BIT_RADIO_LOG = 1 << (UI_32) eArtifactIdRadioDebugLog,
  ARTIFACT_BIT_CONNECTIVITY_LOG = 1 << (UI_32) eArtifactIdConnectivityDebugLog,
  ARTIFACT_BIT_GRAPHICS_LOG = 1 << (UI_32) eArtifactIdGraphicsDebugLog,
  ARTIFACT_BIT_SYS_LOG = 1 << (UI_32) eArtifactIdSysLog,
  ARTIFACT_BIT_PSTORE_LOG = 1 << (UI_32) eArtifactIdPstoreLog,
  ARTIFACT_BIT_WINSYS_LOG = 1 << (UI_32) eArtifactIdWinSysLog,
  ARTIFACT_BIT_APPFW_LOG = 1 << (UI_32) eArtifactIdAppFwLog,
  ARTIFACT_BIT_TOMOYO_LOG = 1 << (UI_32) eArtifactIdTomoyoLog
};

//////////////////////////////////////////////////////////////////////////////////////////
/////  Definition for Logging Artifact Filepaths
//////////////////////////////////////////////////////////////////////////////////////////
const char LAF_DEBUG_FOLDER[] = "/nv/log";
const char LAF_DEBUG_FOLDER2[] = "/nv/log2";
const char LAF_MONTECARLO_FN[] = "/tmp/MonteCarlo";
const char LAF_METACORE_FN[] = "/tmp/MetaCore";
const char LAF_CMS_FN[] = "/tmp/cms";
const char LAF_INT_DTC_FN[] = "/tmp/dtc_error.log";
const char LAF_LOGGERSERVICELOG_COM[] = "/ramd/log/frameworkunifiedlog/communication";
const char LAF_LOGGERSERVICELOG_RDO[] = "/ramd/log/frameworkunifiedlog/radio";
const char LAF_LOGGERSERVICELOG_CONNECTIVITY[] = "/ramd/log/frameworkunifiedlog/connectivity";
const char LAF_GRAPHICS_FN[] = "/ramd/log/frameworkunifiedlog/graphics.log";
const char LAF_KERNEL_BOOT_FN[] = "/ramd/log/frameworkunifiedlog/kernelboot.log";
const char LAF_SYSLOG[] = "/ramd/log/frameworkunifiedlog/syslog";
const char LAF_PSTORELOG[] = "/dev/pstore";
const char LAF_WINSYS_FN[] = "/ramd/log/frameworkunifiedlog/winsys.log";
const char LAF_APPFW[] = "/ramd/log/frameworkunifiedlog/appfw";
const char LAF_TOMOYO[] = "/nv/ptdata/sec/tomoyo";

#define ARTIFACT_BIT_ALL_OUTPUT_LOG  (ARTIFACT_BIT_LOGGERSERVICE_DEBUG_LOG |  \
              ARTIFACT_BIT_DEBUG_DUMP_LOG |  \
              ARTIFACT_BIT_SYSTEM_DATA_LOG |  \
              ARTIFACT_BIT_SHOW_MEM_TXT |  \
              ARTIFACT_BIT_COM_LOG |    \
              ARTIFACT_BIT_RADIO_LOG |    \
              ARTIFACT_BIT_CONNECTIVITY_LOG |  \
              ARTIFACT_BIT_KERNEL_LOG |    \
                ARTIFACT_BIT_KERNEL_BOOT_LOG  | \
              ARTIFACT_BIT_SCREEN_SHOT |  \
              ARTIFACT_BIT_TRANSMIT_LOG |  \
              ARTIFACT_BIT_PERFORMANCE_LOG |  \
              ARTIFACT_BIT_DRINITIAL_LOG |  \
              ARTIFACT_BIT_DRLOCATION_LOG |  \
              ARTIFACT_BIT_CHLM_MC_LOGS |  \
              ARTIFACT_BIT_INTERNAL_DTC_LOG |  \
              ARTIFACT_BIT_GRAPHICS_LOG |  \
              ARTIFACT_BIT_SYS_LOG |    \
              ARTIFACT_BIT_METACORE_LOGS |      \
              ARTIFACT_BIT_PSTORE_LOG    |      \
              ARTIFACT_BIT_WINSYS_LOG    |      \
                ARTIFACT_BIT_APPFW_LOG |    \
              ARTIFACT_BIT_TOMOYO_LOG)

TLoggingArtifactCfg CErrorEventCfg::m_loggerErrorEventCfgTbl[eErrorEventTypeMaxValue] = {
    { eErrorEventTypeProcessCrash, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeProcessExit, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeHeartBeatFailure, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeSystemLowMemory, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeUserInvokedUserForceReset, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_NONE) } },

    { eErrorEventTypeUserInvokedCollectAllLogs, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_POPUP | EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeUserInvokedCollectScreenShot, { (ARTIFACT_BIT_NONE
        | ARTIFACT_BIT_SCREEN_SHOT),

    (EVENT_BIT_POPUP | EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeUserInvokedCollectInterfaceunifiedLogs, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_POPUP | EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeUserInvokedCollectDevLogs, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_NONE) }
    },

    { eErrorEventTypeBootMicroReset, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeEelExport, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_POPUP | EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeInterfaceunifiedEmmcLogs, { (ARTIFACT_BIT_DEBUG_FOLDER_CONTENT
        | ARTIFACT_BIT_DEBUG_FOLDER2_CONTENT),

    (EVENT_BIT_POPUP | EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeDiagEvent, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_DIAG) } },

    { eErrorEventTypeCanEvent, { ARTIFACT_BIT_ALL_OUTPUT_LOG,
    (EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeDtcEvent, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG),

    (EVENT_BIT_CAN_NOTIFICATION) } },

    { eErrorEventTypeModConnFailed, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeStartRespFailed, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeModuleInvokedResetRequest, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeModuleInvokedCollectDebugLogs,
        { (ARTIFACT_BIT_ALL_OUTPUT_LOG | ARTIFACT_BIT_NAVI_LOG),
            (EVENT_BIT_NONE) } },

    { eErrorEventTypeUserInvokedClearLogs, { (ARTIFACT_BIT_NONE
        | ARTIFACT_BIT_CLEAR_ALL_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeUserInvokedCollectNaviLog, { (ARTIFACT_BIT_NONE
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeGroupRelaunch, { (ARTIFACT_BIT_ALL_OUTPUT_LOG
        | ARTIFACT_BIT_NAVI_LOG), (EVENT_BIT_NONE) } },

    { eErrorEventTypeReserved1, { (ARTIFACT_BIT_NONE), (EVENT_BIT_NONE) } },

    { eErrorEventTypeReserved2, { (ARTIFACT_BIT_NONE), (EVENT_BIT_NONE) } },

    { eErrorEventTypeReserved3, { (ARTIFACT_BIT_NONE), (EVENT_BIT_NONE) } } };

TLoggingArtifact CErrorEventCfg::m_loggerErrorArtifactCfgTbl[eArtifactIdMaxValue] = {  // LCOV_EXCL_BR_LINE 11:Unexpected branch
    /*Artifact ID    Owner    Timeout Callback Type    Path CallBack Function    Delete tmp artifact*/
    { eArtifactIdInterfaceunifiedDebugLog, { SERVICE_LOGGER, 5000, { eCbTypeFunction, "",
        SSLogger_SendtoSelf }, TRUE } }, { eArtifactIdTransmitLog,
        { SERVICE_LOGGER, 5000, { eCbTypeFunction, "", SSLogger_SendtoSelf },
            TRUE } }, { eArtifactIdPerformanceLog, { SERVICE_LOGGER, 5, {
        eCbTypeFunction, "", SSLogger_SendtoSelf }, FALSE } }, {
        eArtifactIdBootMicroLog, { SERVICE_SYSMANAGER, 1000, { eCbTypeFunction,
            "", SSLogger_SendtoSM }, TRUE } }, { eArtifactIdSystemDataCsv, {
        SERVICE_SYSMANAGER, 5000, { eCbTypeFunction, "", SSLogger_SendtoSM },
        TRUE } }, { eArtifactIdShowMemTxt, { SERVICE_SYSMANAGER, 8000, {
        eCbTypeFunction, "", SSLogger_SendtoSM }, TRUE } }, {
        eArtifactIdProcessCore, { SERVICE_SYSMANAGER, 5000, { eCbTypeFunction,
            "", SSLogger_SendtoSM }, TRUE } }, { eArtifactIdDebugDumpLog, {
        SERVICE_SYSMANAGER, 4000, { eCbTypeFunction, "", SSLogger_SendtoSM },
        TRUE } }, { eArtifactIdScreenShot, { SERVICE_LOGGER, 1100, {
        eCbTypeFunction, "", SSLogger_SendtoSelf }, TRUE } }, {
        eArtifactIdDebugFolderContent, { SERVICE_LOGGER, 50000, { eCbTypePath,
            LAF_DEBUG_FOLDER, NULL }, FALSE } }, {
        eArtifactIdDebugFolder2Content, { SERVICE_LOGGER, 50000, { eCbTypePath,
            LAF_DEBUG_FOLDER2, NULL }, FALSE } }, { eArtifactIdKernelLog,
        { SERVICE_LOGGER, 5000, { eCbTypeFunction, "", SSLogger_SendtoSelf },
            TRUE } }, { eArtifactIdKernelBootLog, { SERVICE_LOGGER, 5000, {
        eCbTypePath, LAF_KERNEL_BOOT_FN, NULL }, FALSE } }, {
        eArtifactIdDRInitialLog, { SERVICE_LOGGER, 500, { eCbTypeFunction, "",
            SSLogger_SendtoSelf }, TRUE } }, { eArtifactIdDRLocationLog,
        { SERVICE_LOGGER, 500, { eCbTypeFunction, "", SSLogger_SendtoSelf },
            TRUE } }, { eArtifactIdCpuHighLoadMonteCarloLogs, { SERVICE_LOGGER,
        50, { eCbTypePath, LAF_MONTECARLO_FN, NULL }, TRUE } }, {
        eArtifactIdMetaCoreLogs, { SERVICE_LOGGER, 50, { eCbTypePath,
            LAF_METACORE_FN, NULL }, TRUE } }, { eArtifactIdCmsLogs, {
        SERVICE_LOGGER, 500, { eCbTypePath, LAF_CMS_FN, NULL }, TRUE } }, {
        eArtifactIDInternalDTC, { SERVICE_LOGGER, 500, { eCbTypePath,
            LAF_INT_DTC_FN, NULL }, TRUE } }, { eArtifactIdComDebugLog, {
        SERVICE_LOGGER, 500, { eCbTypePath, LAF_LOGGERSERVICELOG_COM, NULL }, FALSE } }, {
        eArtifactIdRadioDebugLog, { SERVICE_LOGGER, 500, { eCbTypePath,
            LAF_LOGGERSERVICELOG_RDO, NULL }, FALSE } }, {
        eArtifactIdConnectivityDebugLog, { SERVICE_LOGGER, 500, { eCbTypePath,
            LAF_LOGGERSERVICELOG_CONNECTIVITY, NULL }, FALSE } }, {
        eArtifactIdGraphicsDebugLog, { SERVICE_LOGGER, 50, { eCbTypePath,
            LAF_GRAPHICS_FN, NULL }, FALSE } }, { eArtifactIdSysLog, {
        SERVICE_LOGGER, 50, { eCbTypePath, LAF_SYSLOG, NULL }, FALSE } }, {
        eArtifactIdPstoreLog, { SERVICE_LOGGER, 50, { eCbTypePath,
            LAF_PSTORELOG, NULL }, FALSE } }, { eArtifactIdClearAllLog,
        { SERVICE_LOGGER, 500, { eCbTypeFunction, "", SSLogger_SendtoSelf },
            FALSE } }, { eArtifactIdNaviLog, { SERVICE_LOGGER, 5000, {
        eCbTypeFunction, "", SSLogger_SendtoSelf }, FALSE } }, {
        eArtifactIdWinSysLog, { SERVICE_LOGGER, 50, { eCbTypePath,
            LAF_WINSYS_FN, NULL }, FALSE } }, { eArtifactIdAppFwLog, {
        SERVICE_LOGGER, 500, { eCbTypePath, LAF_APPFW, NULL }, FALSE } }, {
        eArtifactIdTomoyoLog, { SERVICE_LOGGER, 50, { eCbTypePath, LAF_TOMOYO,
            NULL }, TRUE } } };  // LCOV_EXCL_BR_LINE 11:Unexpected branch

CErrorEventCfg::CErrorEventCfg() {
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
}

CErrorEventCfg::~CErrorEventCfg() {  // LCOV_EXCL_START 14:globle instance
  AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
}
// LCOV_EXCL_STOP

EFrameworkunifiedStatus CErrorEventCfg::Initialize(void) {
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
  EFrameworkunifiedStatus l_eStatus = eFrameworkunifiedStatusOK;
  UI_32 l_cnt;

  for (l_cnt = 0; l_cnt < eArtifactIdMaxValue; l_cnt++) {
    EArtifactId l_artifactId = m_loggerErrorArtifactCfgTbl[l_cnt].ArtifactId;
    TLoggingArtifactInformation l_artifactInformation =
        m_loggerErrorArtifactCfgTbl[l_cnt].Information;
    m_errorArtifactMap[l_artifactId] = l_artifactInformation;  // LCOV_EXCL_BR_LINE 11:Unexpected branch
  }
  for (l_cnt = 0; l_cnt < eErrorEventTypeMaxValue; l_cnt++) {
    EErrorEventType l_eventType = m_loggerErrorEventCfgTbl[l_cnt].ErrorType;
    TLoggingErrorEventInformation l_errorEvtInformation =
        m_loggerErrorEventCfgTbl[l_cnt].Information;
    m_errorEventTypeToArtifactBitMaskMap[l_eventType] = l_errorEvtInformation;
  }

  l_eStatus = (EFrameworkunifiedStatus) ValidateConfiguration();
  LOG_STATUS_IF_ERRORED(l_eStatus, "ValidateConfiguration()");  // LCOV_EXCL_BR_LINE 5:macro

  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
  return (l_eStatus);
}

UI_32 CErrorEventCfg::ValidateConfiguration(void) {
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");

  UI_32 l_return = 0;
  if (eArtifactIdMaxValue != m_errorArtifactMap.size()) {  // LCOV_EXCL_BR_LINE 6:Be sure not to exceed the eArtifactIdMaxValue
    // LCOV_EXCL_START 6:Be sure not to exceed the eArtifactIdMaxValue
    AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
    FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__,
           "Artifact map size mismatch: Expected: %d, Found: %d",
           eArtifactIdMaxValue, m_errorArtifactMap.size());
    l_return |= 1;
    // LCOV_EXCL_STOP
  }
  if (eErrorEventTypeMaxValue != m_errorEventTypeToArtifactBitMaskMap.size()) {  // LCOV_EXCL_BR_LINE 6:Be sure not to exceed the eErrorEventTypeMaxValue
    // LCOV_EXCL_START 6:Be sure not to exceed the eErrorEventTypeMaxValue
    AGL_ASSERT_NOT_TESTED();  // LCOV_EXCL_LINE 200: test assert
    FRAMEWORKUNIFIEDLOG(ZONE_ERR, __FUNCTION__,
           "Error event map size mismatch: Expected: %d, Found: %d",
           eErrorEventTypeMaxValue, m_errorEventTypeToArtifactBitMaskMap.size());
    l_return |= 4;
    // LCOV_EXCL_STOP
  }

  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
  return (l_return);
}

void CErrorEventCfg::GetArtifactRequestVec(
    EErrorEventType f_eventType,
    std::vector<TLoggingArtifact> &f_refArtifactRequestVec) {
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
  ARTIFACT_BIT_MASK l_artifactRequestBits = 0;
  ARTIFACT_BIT l_artifactBit;
  TLoggingArtifact l_artifact;
  UI_32 l_artifactId;

  f_refArtifactRequestVec.clear();

  if (f_eventType < eErrorEventTypeMaxValue) {
    l_artifactRequestBits = m_errorEventTypeToArtifactBitMaskMap[f_eventType]
        .ArtifactBitMask;
  }

  if (l_artifactRequestBits > 0) {
    for (l_artifactId = 0; l_artifactId < eArtifactIdMaxValue; l_artifactId++) {
      l_artifactBit = (ARTIFACT_BIT) (1 << l_artifactId);
      if ((l_artifactRequestBits & l_artifactBit) > 0) {
        l_artifact.ArtifactId = (EArtifactId) l_artifactId;
        l_artifact.Information = m_errorArtifactMap[l_artifact.ArtifactId];
        f_refArtifactRequestVec.push_back(l_artifact);
      }
    }
  }

  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
}

EVENT_BIT_MASK CErrorEventCfg::GetEventsForErrorEvent(
    EErrorEventType f_eventType) {
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "+");
  EVENT_BIT_MASK l_events = EVENT_BIT_NONE;
  if (f_eventType < eErrorEventTypeMaxValue) {  // LCOV_EXCL_BR_LINE 6:Be sure not to exceed the eErrorEventTypeMaxValue
    l_events = m_errorEventTypeToArtifactBitMaskMap[f_eventType].EventBitMask;
  }
  FRAMEWORKUNIFIEDLOG(ZONE_FUNC, __FUNCTION__, "-");
  return (l_events);
}  // LCOV_EXCL_BR_LINE 10:the last line