Copy GIS Server Logs Real-time to a network share?

220
1
04-06-2024 06:05 PM
ThomasColson
MVP Frequent Contributor

From Specify server log settings  "The default directory where the server writes its logs is c:\arcgisserver\logs. The log path must be set to a local directory..." but I have a need to have the log files on a network share (many multi-machine sites). Anyone got some voo-doo magic they can share that can mirror the GIS Server logs? 

0 Kudos
1 Reply
A_Wyn_Jones
Esri Contributor

As the ArcGIS Server install contains python - you could use python on a scheduled task to copy the log files to your network share as often as you'd like.

You would need:

import shutil
src=r'c:\arcgisserver\logs\mymachine'
dst = r'\\myshare\allmylogs\machine3' shutil.copyfile(src, dst) or
shutil.copy(src, dst)

 Hope this helps!

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
0 Kudos