浏览代码

阿里云日志store环境变量

Michael Wang 5 年之前
父节点
当前提交
11c0f2b6f1
共有 5 个文件被更改,包括 6 次插入2 次删除
  1. 1 0
      .env.production
  2. 1 0
      .env.stagingAli
  3. 1 0
      src/constants/constants.js
  4. 2 1
      src/utils/logger.js
  5. 1 1
      src/utils/loghub-tracking.js

+ 1 - 0
.env.production

@@ -2,6 +2,7 @@ VUE_APP_CONFIG_FILE_SEVER_URL=https://ecs-static.qmth.com.cn
 # 考虑直接用location.host,即以下两个变量不需要
 VUE_APP_TK_SERVER_HTML_URL=http://ecs.qmth.com.cn
 VUE_APP_TK_SERVER_API_URL=http://ecs.qmth.com.cn
+VUE_APP_SLS_STORE_NAME=student-client
 #VUE_APP_WK_SERVER_SOCKET=wss://ecs.qmth.com.cn:8878/api/ws/faceBiopsy
 #VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs.qmth.com.cn:8878/api/ws/fileAnswer
 VUE_APP_GIT_REPO_VERSION=TO_BE_OVERRIDED

+ 1 - 0
.env.stagingAli

@@ -2,6 +2,7 @@ VUE_APP_SKIP_CHECK_NATIVE=true
 VUE_APP_CONFIG_FILE_SEVER_URL=https://ecs-test-static.qmth.com.cn
 VUE_APP_TK_SERVER_HTML_URL=http://ecs-test.qmth.com.cn
 VUE_APP_TK_SERVER_API_URL=http://ecs-test.qmth.com.cn
+VUE_APP_SLS_STORE_NAME=student-client-test
 #VUE_APP_WK_SERVER_SOCKET=wss://ecs-test.qmth.com.cn:8878/api/ws/faceBiopsy
 #VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO=wss://ecs-test.qmth.com.cn:8878/api/ws/fileAnswer
 VUE_APP_GIT_REPO_VERSION=TO_BE_OVERRIDED

+ 1 - 0
src/constants/constants.js

@@ -12,6 +12,7 @@ export const VUE_APP_WK_SERVER_SOCKET_FOR_AUDIO =
   "/api/ws/fileAnswer";
 export const VUE_APP_CONFIG_FILE_SEVER_URL =
   process.env.VUE_APP_CONFIG_FILE_SEVER_URL;
+export const VUE_APP_SLS_STORE_NAME = process.env.VUE_APP_SLS_STORE_NAME;
 export const FACE_API_MODEL_PATH = "/models/20190620/";
 // export const EPCC_DOMAIN = "iepcc-ps.ecs.qmth.com.cn";
 export const EPCC_DOMAIN = "bds.ecs.qmth.com.cn";

+ 2 - 1
src/utils/logger.js

@@ -1,7 +1,8 @@
 import "@/utils/loghub-tracking.js";
+import { VUE_APP_SLS_STORE_NAME } from "@/constants/constants";
 const host = "cn-shenzhen.log.aliyuncs.com";
 const project = "examcloud";
-const logstore = "student-client-test";
+const logstore = VUE_APP_SLS_STORE_NAME;
 const logger = new window.Tracker(`${host}`, `${project}`, `${logstore}`);
 // logger.push("customer", "zhangsan");
 // logger.push("product", "iphone 6s");

+ 1 - 1
src/utils/loghub-tracking.js

@@ -10,7 +10,7 @@
   }
   function AliLogTracker(host, project, logstore) {
     this.uri_ =
-      "http://" +
+      "https://" +
       project +
       "." +
       host +