<?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 Change log4j format for the ambari-worker in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Change-log4j-format-for-the-ambari-worker/m-p/120659#M83422</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I would like to change the output format for the log4j Ambari Agent Service. In the server I just changed the pattern in a properties file, but I can see the agent does not have that (or I cannot find it). What would be the way to change it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 17:20:09 GMT</pubDate>
    <dc:creator>christian_lutta</dc:creator>
    <dc:date>2016-11-24T17:20:09Z</dc:date>
    <item>
      <title>Change log4j format for the ambari-worker</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Change-log4j-format-for-the-ambari-worker/m-p/120659#M83422</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I would like to change the output format for the log4j Ambari Agent Service. In the server I just changed the pattern in a properties file, but I can see the agent does not have that (or I cannot find it). What would be the way to change it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 17:20:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Change-log4j-format-for-the-ambari-worker/m-p/120659#M83422</guid>
      <dc:creator>christian_lutta</dc:creator>
      <dc:date>2016-11-24T17:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Change log4j format for the ambari-worker</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Change-log4j-format-for-the-ambari-worker/m-p/120660#M83423</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/14504/christianluttazi.html" nodeid="14504"&gt;@Chris L&lt;/A&gt; The Ambari Agent is a python process so uses Python's &lt;A href="https://docs.python.org/2/library/logging.html"&gt;logging facility&lt;/A&gt;. To change the pattern, go to /etc/ambari-agent/conf and copy logging.conf.sample to logging.conf, then edit it and look for the lines&lt;/P&gt;&lt;PRE&gt;[formatter_logfileformatter]
format=%(levelname)s %(asctime)s %(filename)s:%(lineno)d - %(message)s&lt;/PRE&gt;&lt;P&gt;Change the 'format' line to suit your needs. There is information on the format for this &lt;A href="https://docs.python.org/2/library/logging.html#formatter-objects"&gt;here&lt;/A&gt;. The available attributes that can be written to the file from each log record are given &lt;A href="https://docs.python.org/2/library/logging.html#logrecord-attributes"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 17:29:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Change-log4j-format-for-the-ambari-worker/m-p/120660#M83423</guid>
      <dc:creator>tstebbens</dc:creator>
      <dc:date>2016-11-24T17:29:57Z</dc:date>
    </item>
  </channel>
</rss>

