# Filebeat logger didn't work

**URL:** <https://discuss.elastic.co/t/filebeat-logger-didnt-work/259468>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 23, 2020, 10:16am UTC](https://discuss.elastic.co/t/filebeat-logger-didnt-work/259468 "2020-12-23T10:16:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dukeyang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dukeyang/32/80951_2.png) [@dukeyang](https://discuss.elastic.co/u/dukeyang)\
**Post date:** [December 23, 2020, 10:16am UTC](https://discuss.elastic.co/t/filebeat-logger-didnt-work/259468/1 "2020-12-23T10:16:37Z")

</div>

I create a new output type (ghttp), and creat a new logger

```auto
      logger = logp.NewLogger("http")

```

I test my logger:

```auto
168	logger.Info("got events",events)
169	logp.L().Info("got events",events)

```

my config was:

```auto
logging.level: info
logging.selectors: ["http"]
logging.to_files: true
logging.files:
  path: ./
  name: filebeat.log
  rotateeverybytes: 10485760 # = 10MB
  keepfiles: 7

```

the logger seems don't work well, events only print once

```auto
2020-12-23T17:52:48.562+0800 INFO pipeline/output.go:95 Connecting to backoff(https://kafka-gateway.gifshow.com:443/perf)
2020-12-23T17:52:48.562+0800 INFO pipeline/output.go:105 Connection to backoff(https://kafka-gateway.gifshow.com:443/perf) established
2020-12-23T17:52:48.563+0800 INFO http/client.go:169 got events[{{2020-12-23 17:52:47.557752 +0800 CST m=+10.108534092 {} {"@log_type":"srs","Referer":"","UA":"python-requests/2.25.0","a_c":"Other","a_ch_num":0,"a_s_rate":-1,"app":" __defaultVhost__","avg_afr":0,"avg_kbr":0,"avg_vfr":0,"block_100s_cnt":0,"block_100s_dur":0,"block_cnt":0,"block_dur":0,"cid":595,"cli_id":" __default__","cli_ip":"120.92.93.201","con":"http-play","dest_ip":"","dr_a_fs":0,"dr_pkt_dur":0,"dr_v_fs":0,"dur":0,"exit_code":9100,"h":0,"kB":0,"my_time_add":"2020-12-23T17:52:47+08:00","mydur-srs":0,"namespace":"srs","net_pub":1,"no_video_dur":0,"osid":"","play_cnt":1,"req_sid":"","sid":"","skip_dur":0,"speed_0.75x":0,"speed_1.25x":0,"speed_1.5x":0,"speed_1x":0,"srs_md":false,"srs_ver":"6.0.777","srv_host":"yangdan03.local","srv_id":"cdn-kes-ln-shenyang-ctum-edge274-db-txyun_8101","stime":"2020-12-10T20:56:38.793+08:00","sum_afc":0,"sum_vfc":0,"tp":"play_summary","tsc_type":"org","ttime":"2020-12-10T20:56:38.793+08:00","url":"xxxxx","v_c":"Other","vht":"","w":0,"xfor_ip":""} { false 0xc000196ea0 /Users/lonelymml/Downloads/filebeat-7.10.1-darwin-x86_64/srs.log 821 2020-12-23 17:52:47.557111 +0800 CST m=+10.107893766 -1ns log map[] 65976391-16777223} false} 1 {map[]}}]
2020-12-23T17:52:49.089+0800 INFO http/client.go:264 got resp {"message":"success"}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 20, 2021, 12:16pm UTC](https://discuss.elastic.co/t/filebeat-logger-didnt-work/259468/2 "2021-01-20T12:16:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
