NLog.Targets.Fluentd icon indicating copy to clipboard operation
NLog.Targets.Fluentd copied to clipboard

Sending JSON in message is serialized

Open DuskoV opened this issue 9 years ago • 1 comments

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

DuskoV avatar Dec 06 '16 17:12 DuskoV

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>

DuskoV avatar Dec 06 '16 17:12 DuskoV