Search code examples
nlogfluentd

How to make Fluentd write a log file


I can't figure it out how to write log files using fluentd, any help is welcome. P.S.: I know that my config file is probably full of redundancies, it's because I was trying many things.

I'm executing using the Td-Agent prompt with the following command: fluentd -c etc\td-agent\td-agent.conff

<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>

Solution

  • Use out_copy plugin to use multiple output plugins.