fluent / NLog.Targets.Fluentd

Apache License 2.0
44 stars 31 forks source link

Sending JSON in message is serialized #4

Open DuskoV opened 7 years ago

DuskoV commented 7 years ago

JSON message is serialized before being pushed out. How this can be changed (I need it JSON, not as JSON string)?

DuskoV commented 7 years ago

Also tried with JsonLayout, but FluentD is not "honoring" settings from JsonLayout. Sample:

  <target xsi:type="Fluentd" name="LoggerTarget"
          host="hostname"
          tag="tag.data.target"
          noDelay="true"
          sendBufferSize="4096"
          sendTimeout="2"
          lingerEnabled="false"
          lingerTime="2"
          emitStackTraceWhenAvailable="true"
        >
    <layout xsi:type="JsonLayout">
      <attribute name='message' layout='${message}' encode='false' />
      <attribute name="time" layout="${date:format=yyyy-MM-ddTHH\:mm\:ss}" />
    </layout>
  </target>