<?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: Create a log file from Geoprocessing service in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25084#M2192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestions guys. I couldn't make that work but my workaround is migrating the arcpy file itself to arcgis server instead of publishing it as a service. Now it's working fine and the log file is also created successfully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2018 08:49:47 GMT</pubDate>
    <dc:creator>Arun_PrasadRamanujadoss</dc:creator>
    <dc:date>2018-11-15T08:49:47Z</dc:date>
    <item>
      <title>Create a log file from Geoprocessing service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25081#M2189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a ArcPy tool update some feature in ArcGIS desktop, also generating a log file to update some of the tasks, the script running fine in the desktop. When publishing it as a service to call the same from ArcGIS server, the log file is not created in the given path, but the process was completed successfully and the results are updated. What would be the correct way for creating a log file(or any other file) from a geoprocessing service?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 07:44:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25081#M2189</guid>
      <dc:creator>Arun_PrasadRamanujadoss</dc:creator>
      <dc:date>2018-08-30T07:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create a log file from Geoprocessing service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25082#M2190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to ask this question in the Python community:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This space is more geared towards questions about the ArcGIS API for JavaScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Noah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:26:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25082#M2190</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2018-08-30T20:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create a log file from Geoprocessing service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25083#M2191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;File based outputs of GP services will be written to the scratch directory by design: C:\arcgisserver\directories\arcgisjobs\&amp;lt;service&amp;gt;\&amp;lt;jobID&amp;gt;\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can write the log to that directory using the arcpy.env.scratchFolder environment variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;logPath = os.path.join(arcpy.env.scratchFolder,"gplog.log")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is challenging as you then need to know the job ID of the job to retrieve the results. You may be able to write to a table in a database, though. What do you need the log file for? What if you just return messages within the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;arcpy.AddMessage("Successfully &amp;lt;did whatever&amp;gt;")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the GP service to return Info messages, the client will be able to retrieve the messages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:51:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25083#M2191</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2018-08-30T21:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create a log file from Geoprocessing service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25084#M2192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestions guys. I couldn't make that work but my workaround is migrating the arcpy file itself to arcgis server instead of publishing it as a service. Now it's working fine and the log file is also created successfully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 08:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-log-file-from-geoprocessing-service/m-p/25084#M2192</guid>
      <dc:creator>Arun_PrasadRamanujadoss</dc:creator>
      <dc:date>2018-11-15T08:49:47Z</dc:date>
    </item>
  </channel>
</rss>

