1 /* 2 * Copyright (c) 2021 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 #ifndef HILOGTOOL_H 16 #define HILOGTOOL_H 17 18 namespace OHOS { 19 namespace HiviewDFX { 20 #define DOMAIN_NUMBER_BASE (16) 21 #define DOMAIN_MAX_SCOPE 0xDFFFFFF 22 23 typedef struct { 24 uint16_t noBlockMode; 25 uint8_t nPid; 26 uint8_t nNoPid; 27 uint8_t nDomain; 28 uint8_t nNoDomain; 29 uint8_t nTag; 30 uint8_t nNoTag; 31 uint16_t types; 32 uint16_t levels; 33 uint16_t headLines; 34 uint16_t tailLines; 35 std::string domain; // domain recv 36 std::string tag; // tag recv 37 std::string pids[MAX_PIDS]; 38 std::string domains[MAX_DOMAINS]; // domains send 39 std::string tags[MAX_TAGS]; // tags send 40 uint16_t noTypes; 41 uint16_t noLevels; 42 std::string noPids[MAX_PIDS]; 43 std::string noDomains[MAX_DOMAINS]; 44 std::string noTags[MAX_TAGS]; 45 std::string regexArgs; 46 std::string buffSizeArgs; 47 std::string logFileCtrlArgs; 48 std::string fileSizeArgs; 49 std::string fileNumArgs; 50 std::string filePathArgs; 51 std::string fileNameArgs; 52 std::string jobIdArgs; 53 std::string personalArgs; 54 std::string kmsgArgs; 55 std::string logClearArgs; 56 std::string logTypeArgs; 57 std::string domainArgs; 58 std::string statisticArgs; 59 std::string tagArgs; 60 std::string logLevelArgs; 61 std::string flowSwitchArgs; 62 std::string flowQuotaArgs; 63 std::string pidArgs; 64 std::string algorithmArgs; 65 } HilogArgs; 66 } // namespace HiviewDFX 67 } // namespace OHOS 68 #endif 69