|
|
@@ -23,7 +23,7 @@ logger.Critical("出错了") |
|
|
|
logger.Info("出错了") |
|
|
|
``` |
|
|
|
|
|
|
|
4. 如果需要写入es, 必须设置环境变量 `GRLOG_APP_NAME`, 不能有反斜杠, 如 |
|
|
|
4. 如果需要写入es 或 alils, 必须设置环境变量 `GRLOG_APP_NAME`, 不能有反斜杠, 如 |
|
|
|
```shell script |
|
|
|
export GRLOG_APP_NAME=mkt.gaore.com; |
|
|
|
``` |
|
|
@@ -32,6 +32,10 @@ export GRLOG_APP_NAME=mkt.gaore.com; |
|
|
|
import _ "golib.gaore.com/GaoreGo/grlogs/logs/es" |
|
|
|
``` |
|
|
|
|
|
|
|
```go |
|
|
|
import _ "golib.gaore.com/GaoreGo/grlogs/logs/alils" |
|
|
|
``` |
|
|
|
|
|
|
|
5. 文件日志会写入到 `./runtime/logs/` 文件夹 **请务必在项目构建阶段创建该目录** |
|
|
|
|
|
|
|
|
|
|
|