37 Star 403 Fork 75

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
templatesource.go 568 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aiwantaozi 提交于 2019-04-08 18:10 . Refactoring logging template
package generator
var SourceTemplate = `
{{define "source-rke"}}
<source>
@type tail
path /var/lib/rancher/rke/log/*.log
pos_file /fluentd/log/{{ .RkeLogPosFilename }}
time_format %Y-%m-%dT%H:%M:%S.%N
tag {{ .RkeLogTag }}.*
format json
read_from_head true
</source>
{{end}}
{{define "source-container"}}
<source>
@type tail
path /var/log/containers/*.log
pos_file /fluentd/log/{{ .ContainerLogPosFilename}}
time_format %Y-%m-%dT%H:%M:%S
tag {{ .ContainerLogSourceTag }}.*
format json
read_from_head true
</source>
{{end}}
`
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.2.5-rc9

搜索帮助