• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "hisysevent.h"
17 #include "print_log.h"
18 #include "hisys_event_util.h"
19 #include "print_job.h"
20 
21 namespace OHOS::Print {
22     using namespace OHOS::HiviewDFX;
23 
reportBehaviorEvent(std::string packageName,int behaviorCode,const std::string & msg)24     void HisysEventUtil::reportBehaviorEvent(std::string packageName, int behaviorCode, const std::string &msg)
25     {
26         HiSysEventWrite(
27             HW_PRINT_SPOOLER,
28             BEHAVIOR_DESCRIPTION,
29             HiSysEvent::EventType::BEHAVIOR,
30             "PACKAGE_NAME", packageName,
31             "PROCESS_NAME", packageName,
32             "BEHAVIOR_CODE", behaviorCode,
33             "DEVICE_TYPE", DEVICE_TYPE,
34             "ACTION", behaviorCode,
35             "START_TIME", INACTIVE,
36             "END_TIME", INACTIVE,
37             "START_TIME", INACTIVE,
38             "MSG", msg);
39     }
40 }