<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Creating log files in nifi based on processor group in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Creating-log-files-in-nifi-based-on-processor-group/m-p/361479#M238602</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wanted to create log files in nifi based on the processor group, could someone help me on the configuration that needs to be done in logback.xml file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like currently i have 3 different processor groups and i wanted to create 3 different log files for each of them.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2023 07:14:33 GMT</pubDate>
    <dc:creator>srilakshmi</dc:creator>
    <dc:date>2023-01-17T07:14:33Z</dc:date>
    <item>
      <title>Creating log files in nifi based on processor group</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Creating-log-files-in-nifi-based-on-processor-group/m-p/361479#M238602</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I wanted to create log files in nifi based on the processor group, could someone help me on the configuration that needs to be done in logback.xml file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like currently i have 3 different processor groups and i wanted to create 3 different log files for each of them.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 07:14:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Creating-log-files-in-nifi-based-on-processor-group/m-p/361479#M238602</guid>
      <dc:creator>srilakshmi</dc:creator>
      <dc:date>2023-01-17T07:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating log files in nifi based on processor group</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Creating-log-files-in-nifi-based-on-processor-group/m-p/361573#M238627</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/102964"&gt;@srilakshmi&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Logging does not happen at the process group level.&amp;nbsp; Processors logging is based on the processor class.&amp;nbsp; So there is nothing in the log output produced by a processor within a process group that is going to tell you in which process group that particular processor belongs.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;That being said, you may be able to prefix every processor's name within the same Process group with some string that identifies the process group.&amp;nbsp; This processor name would generally be included in the the log output produced by the processor.&amp;nbsp; Then you may be able to use logback filters (have not tried this myself) to filter log output based on these unique strings.&lt;BR /&gt;&lt;A href="https://logback.qos.ch/manual/filters.html" target="_blank" rel="noopener"&gt;https://logback.qos.ch/manual/filters.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NiFi bulletins (bulletins are log output to the NiFi UI and have a rolling 5 minute life in the UI) however do include details about the parent Process Group in which the component generating the bulletin resides.&amp;nbsp; &amp;nbsp;You could build a dataflow in yoru NiFi to handle bulletin notification through the use of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-site-to-site-reporting-nar/1.19.1/org.apache.nifi.reporting.SiteToSiteBulletinReportingTask/index.html" target="_self" rel="nofollow noopener noreferrer"&gt;SiteToSiteBulletinReportingTask&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;which is used to send bulletin to a destination remote import port on a target NiFi.&amp;nbsp; A dataflow on the target NiFi could be built to parse the received bulletin records by the&amp;nbsp;bulletinGroupName json path property so that all records from same PG are kept together.&amp;nbsp; These&amp;nbsp; 'like' records could then be written out to local filesystem based on the PG name, remote system, used to send email notifications, etc...&lt;BR /&gt;&lt;BR /&gt;Example of what a Bulletin sent using the SiteToSiteBulletinReportingTask looks like:&lt;/P&gt;&lt;PRE&gt;{
  "objectId" : "541dbd22-aa4b-4a1a-ad58-5d9a0b730e42",
  "platform" : "nifi",
  "bulletinId" : 2200,
  "bulletinCategory" : "Log Message",
  "bulletinGroupId" : "7e7ad459-0185-1000-ffff-ffff9e0b1503",
  "bulletinGroupName" : "PG2-Bulletin",
  "bulletinGroupPath" : "NiFi Flow / Matt's PG / PG2-Bulletin",
  "bulletinLevel" : "DEBUG",
  "bulletinMessage" : "UpdateAttribute[id=8c5b3806-9c3a-155b-ba15-260075ce9a6f] Updated attributes for StandardFlowFileRecord[uuid=1b0cb23a-75d8-4493-ba82-c6ea5c7d1ce3,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1672661850924-5, container=default, section=5], offset=969194, length=1024],offset=0,name=bulletin-${nextInt()).txt,size=1024]; transferring to 'success'",
  "bulletinNodeId" : "e75bf99f-095c-4672-be53-bb5510b3eb5c",
  "bulletinSourceId" : "8c5b3806-9c3a-155b-ba15-260075ce9a6f",
  "bulletinSourceName" : "PG1-UpdateAttribute",
  "bulletinSourceType" : "PROCESSOR",
  "bulletinTimestamp" : "2023-01-04T20:38:27.776Z"
}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;In the above produced bulletin json you see the BulletinGroupName and the BulletinMessage (the actual log output).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 21:23:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Creating-log-files-in-nifi-based-on-processor-group/m-p/361573#M238627</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-01-17T21:23:17Z</dc:date>
    </item>
  </channel>
</rss>

