mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 15:12:24 +00:00
feat: host log save into directory and compress log file add-ons file count use default value 300.
Signed-off-by: TaowerfulMAX <liurantao@huawei.com>
This commit is contained in:
parent
8f4cbffd93
commit
bf35b74c83
@ -498,8 +498,7 @@ namespace Base {
|
||||
}
|
||||
// Sort file names by time, with newer ones coming first
|
||||
sort(files.begin(), files.end(), CompareLogFileName);
|
||||
uint64_t limitDirSize = (g_logLevel < LOG_DEBUG) ? NORMAL_LOG_DIR_SIZE : MAX_LOG_DIR_SIZE;
|
||||
uint32_t deleteCount = GetLogOverCount(files, limitDirSize);
|
||||
uint32_t deleteCount = GetLogOverCount(files, MAX_LOG_DIR_SIZE);
|
||||
WRITE_LOG(LOG_INFO, "log file count: %u, logLimit: %u", files.size(), logLimitSize);
|
||||
if (deleteCount == 0 || files.size() < deleteCount) {
|
||||
return;
|
||||
|
@ -25,10 +25,9 @@ constexpr size_t SIZE_THREAD_POOL_MIN = 16;
|
||||
constexpr size_t SIZE_THREAD_POOL_MAX = 256;
|
||||
constexpr uint8_t GLOBAL_TIMEOUT = 30;
|
||||
constexpr uint16_t DEFAULT_PORT = 8710;
|
||||
constexpr uint16_t MAX_LOG_FILE_COUNT = 30;
|
||||
constexpr uint16_t MAX_LOG_FILE_COUNT = 300;
|
||||
constexpr uint64_t MAX_LOG_FILE_SIZE = static_cast<uint64_t>(100) * 1024 * 1024; // 100MB
|
||||
constexpr uint64_t MAX_LOG_DIR_SIZE = static_cast<uint64_t>(3) * 1024 * 1024 * 1024; // 3GB
|
||||
constexpr uint64_t NORMAL_LOG_DIR_SIZE = static_cast<uint64_t>(200) * 1024 * 1024; // 200MB
|
||||
constexpr bool ENABLE_IO_CHECKSUM = false;
|
||||
const string IPV4_MAPPING_PREFIX = "::ffff:";
|
||||
const string DEFAULT_SERVER_ADDR_IP = "::ffff:127.0.0.1";
|
||||
|
Loading…
Reference in New Issue
Block a user