如何让 Fluentd 写入日志文件

How to make Fluentd write a log file

我不知道如何使用 fluentd 编写日志文件,欢迎任何帮助。 P.S.: 我知道我的配置文件可能充满了冗余,这是因为我尝试了很多东西。

我正在使用 Td-Agent 提示符执行以下命令: fluentd -c etc\td-agent\td-agent.conf

<source>
  @type forward
  bind 0.0.0.0
  port 24230

    </source>
    <match **>
      @type stdout
    </match>
    <match **>
      @type file
      path logs
      add_path_suffix true
      path_suffix ".txt"
      flush_interval 1
      flush_mode.immediate
      flush_at_shutdown
      compress text
      append true
      <buffer>
        @type file
        path logb/logs.*.txt
      </buffer>
    </match>

使用out_copy plugin使用多个输出插件。