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 HIDUMPER_SERVICES_DUMPER_CONSTANT_H 16 #define HIDUMPER_SERVICES_DUMPER_CONSTANT_H 17 18 #include <string> 19 #include <vector> 20 #include <iostream> 21 #include <memory> 22 23 namespace OHOS { 24 namespace HiviewDFX { 25 enum DumperConstant { 26 NONE, 27 GROUP, // group 28 DUMPER_BEGIN, // dumper begin 29 CPU_DUMPER, 30 FILE_DUMPER, 31 ENV_PARAM_DUMPER, 32 CMD_DUMPER, 33 PROPERTIES_DUMPER, 34 API_DUMPER, 35 LIST_DUMPER, 36 VERSION_DUMPER, 37 SA_DUMPER, 38 MEMORY_DUMPER, 39 STACK_DUMPER, 40 TRAFFIC_DUMPER, 41 DUMPER_END, // dumper end 42 FILTER_BEGIN, // filter begin 43 COLUMN_ROWS_FILTER, 44 FILE_FORMAT_DUMP_FILTER, 45 FILTER_END, // filter end 46 OUTPUT_BEGIN, // output begin 47 STD_OUTPUT, 48 FILE_OUTPUT, 49 FD_OUTPUT, 50 ZIP_OUTPUT, 51 OUTPUT_END, // output end 52 LEVEL_BEGIN, // level begin 53 LEVEL_NONE, 54 LEVEL_MIDDLE, 55 LEVEL_HIGH, 56 LEVEL_ALL, 57 LEVEL_END, // level end 58 GROUPTYPE_BEGIN, // group type begin 59 GROUPTYPE_PID, // pid of group type 60 GROUPTYPE_CPUID, // cpuid of group type 61 GROUPTYPE_END, // group type end 62 LOOP, 63 }; 64 65 const std::string LOG_DEFAULT = "log.txt"; 66 const std::string ZIP_FILEEXT = "zip"; 67 const std::string ZIP_FOLDER = "/data/log/hidumper/"; 68 69 const std::string RELEASE_MODE = "Release"; 70 } // namespace HiviewDFX 71 } // namespace OHOS 72 #endif // HIDUMPER_SERVICES_DUMPER_CONSTANT_H 73