提交 0e6dc166 编写于 作者: H heyanlong

fix bugs

上级 f2007c1f
......@@ -402,7 +402,7 @@ static void write_log(char *text) {
_log_path_lower = php_string_tolower(_log_path);
bzero(logFilename, 100);
sprintf(logFilename, "%s/skywalking.%d.log", ZSTR_VAL(_log_path_lower), get_second());
sprintf(logFilename, "%s/skywalking.%d-%d.log", ZSTR_VAL(_log_path_lower), get_second(), getpid());
zend_string_release(_log_path);
zend_string_release(_log_path_lower);
......
......@@ -148,7 +148,7 @@ int main(int argc, char **argv) {
std::string fileName = std::string(argv[2]) + "/" + dir->d_name;
const std::regex pattern(std::string(argv[2]) + "/skywalking\\.(\\d+)\\.log");
const std::regex pattern(std::string(argv[2]) + "/skywalking\\.(\\d+)-\\d+\\.log");
if (std::regex_match(fileName, pattern)) {
std::match_results<std::string::const_iterator> result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册