| | |
| | | |
| | | logger.add(self.get_path("system", "system"), filter=lambda record: record["extra"].get("name") == "system", |
| | | rotation="00:00", compression="zip", enqueue=True) |
| | | # 显示在控制台 |
| | | logger.add(sys.stdout, |
| | | filter=lambda record: record["extra"].get("name") == "system", enqueue=True) |
| | | |
| | | logger.add(self.get_path("ths", "buy_1_volumn"), |
| | | filter=lambda record: record["extra"].get("name") == "buy_1_volumn", |
| | |
| | | rotation="00:00", compression="zip", enqueue=True) |
| | | |
| | | def get_path(self, dir_name, log_name): |
| | | path_str = "{}/logs/gp/{}/{}".format(constant.get_path_prefix(), dir_name, log_name) + ".{time:YYYY-MM-DD}.log" |
| | | path_str = "{}/ls_logs/gp/{}/{}".format(constant.get_path_prefix(), dir_name, |
| | | log_name) + ".{time:YYYY-MM-DD}.log" |
| | | # print(path_str) |
| | | return path_str |
| | | |
| | | def get_hx_path(self, dir_name, log_name): |
| | | path_str = "{}/logs/huaxin/{}/{}".format(constant.get_path_prefix(), dir_name, |
| | | log_name) + ".{time:YYYY-MM-DD}.log" |
| | | path_str = "{}/ls_logs/huaxin/{}/{}".format(constant.get_path_prefix(), dir_name, |
| | | log_name) + ".{time:YYYY-MM-DD}.log" |
| | | # print(path_str) |
| | | return path_str |
| | | |
| | | def get_local_huaxin_path(self, dir_name, log_name): |
| | | path_str = "{}/logs/huaxin_local/{}/{}".format(constant.get_path_prefix(), dir_name, |
| | | log_name) + ".{time:YYYY-MM-DD}.log" |
| | | path_str = "{}/ls_logs/huaxin_local/{}/{}".format(constant.get_path_prefix(), dir_name, |
| | | log_name) + ".{time:YYYY-MM-DD}.log" |
| | | # print(path_str) |
| | | return path_str |
| | | |