From 366919b6ef4a7c33ef0fb775ddf2a683edc0b164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 29 Dec 2021 14:36:38 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20=E5=AE=8C=E5=96=84readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/readme.md b/readme.md index 702131b..cdbe372 100644 --- a/readme.md +++ b/readme.md @@ -11,4 +11,15 @@ func main() { logger.InitLogger(logger.LogConfig{Mode: logger.Dev, LokiEnable: false, FileEnable: true}) logger.Say.Debug("芜湖") } +``` + +### 环境变量 +```shell +export LOG_MODE=0 # 0: dev, 1: prod +export LOG_LOKI_ENABLE=1 # 是否启用Loki 0: disable, 1: enable +export LOG_FILE_ENABLE=0 # 是否启用输出到文件 0: disable, 1: enable +export LOG_LOKI_HOST=10.0.0.31 # Loki地址 +export LOG_LOKI_PORT=3100 # Loki端口 +export LOG_LOKI_SOURCE_NAME=tests # Loki Source 名称 +export LOG_LOKI_JOB_NAME=testj # Loki Job 名称 ``` \ No newline at end of file