<?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>topic Re: How to write a log file to a defined folder in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139208#M4722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to get a lot more sophisticated with logging progress, you could use the Python &lt;/SPAN&gt;&lt;A href="http://docs.python.org/library/logging.html"&gt;logger&lt;/A&gt;&lt;SPAN&gt; module?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2012 20:00:29 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2012-09-24T20:00:29Z</dc:date>
    <item>
      <title>How to write a log file to a defined folder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139205#M4719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've written python code&amp;nbsp; for map automation. It is working currently. I like to see the log file of this tool and like to save it to some other directory. How do I write log file with username, date stamp and geo processing commands used to a defined folder in other directory. I appreciate your help. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 14:32:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139205#M4719</guid>
      <dc:creator>SahasShrestha</dc:creator>
      <dc:date>2012-09-24T14:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a log file to a defined folder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139206#M4720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's an example on how to write the current windows user and current date and time to a text file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import getpass, datetime&amp;nbsp; f = open(r"C:\temp\python\logfile.txt", "a")&amp;nbsp; user = getpass.getuser() date = str(datetime.datetime.now())&amp;nbsp; f.write("Username:\t" + user + "\n") f.write("Date:\t" + date + "\n")&amp;nbsp; f.close()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 18:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139206#M4720</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-09-24T18:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a log file to a defined folder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139207#M4721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This tool works perfectly well !! Thanks a lot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 19:10:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139207#M4721</guid>
      <dc:creator>SahasShrestha</dc:creator>
      <dc:date>2012-09-24T19:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a log file to a defined folder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139208#M4722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to get a lot more sophisticated with logging progress, you could use the Python &lt;/SPAN&gt;&lt;A href="http://docs.python.org/library/logging.html"&gt;logger&lt;/A&gt;&lt;SPAN&gt; module?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 20:00:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-write-a-log-file-to-a-defined-folder/m-p/139208#M4722</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2012-09-24T20:00:29Z</dc:date>
    </item>
  </channel>
</rss>

