diff options
| author | Shulhan <ms@kilabit.info> | 2019-01-04 11:19:00 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-01-04 15:15:35 +0700 |
| commit | d7739491bdadf7b936095dcc2ba09f57e2f3a322 (patch) | |
| tree | ccfdcc3e4042f4a976db57569a1037c4b59d4c76 /haminer.go | |
| parent | 49e7d14699b299dffa835b2a9240e2f03e8d0dd3 (diff) | |
| download | haminer-d7739491bdadf7b936095dcc2ba09f57e2f3a322.tar.xz | |
Add option to preprocess http_url
Diffstat (limited to 'haminer.go')
| -rw-r--r-- | haminer.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -141,6 +141,13 @@ func (h *Haminer) forwards(halogs []*Halog) { } } +func (h *Haminer) preprocess(halog *Halog) { + halog.tagHTTPURL = halog.HTTPURL + for _, retag := range h.cfg.retags { + halog.tagHTTPURL = retag.preprocess("http_url", halog.tagHTTPURL) + } +} + func (h *Haminer) produce() { halogs := make([]*Halog, 0) @@ -150,6 +157,8 @@ func (h *Haminer) produce() { continue } + h.preprocess(halog) + halogs = append(halogs, halog) if len(halogs) >= h.cfg.MaxBufferedLogs { |
