Debug logging in the cloud

For some of the BPMs and Epicor Functions that I write I build in some logging to a text file. I found a way to do this in the Epicor cloud additional/pilot environments by writing to F:\epicordata[Site ID][Site ID]\Users[Epicor User]\log.txt. I am then able to download the file through the Server File Download program in Epicor. This works fine both by calling the Epicor Function in Epicor or calling the Epicor Function via REST.

However, for the production environments it works different. The drive where the epicordata is located should be the G drive. So i write to G:\epicordata[Site ID][Site ID]\Users[Epicor User]\log.txt. When i call this function from within Epicor this works fine. But when i call this function via REST it throws an exception that says it cannot find the file/drive. I checked which part of the directory could not be found and it seems to be the entire G:/ drive. I assume the cloud team configured the security rights of the production environments drives different than for additional/pilot.

Currently i do face an issue and it would make my life a lot easier if i was able to log to the specified folder on the production environment. Is there any way to make this possible? Or is there a better way to implement debugging in the cloud environment?

Thanks in advance!
Brian

See this thread on how to get the EpicorData location.

As i mentioned, i do know the location.
The problem is that it can’t be accessed when invoking the Epicor Function via REST.

Correct. Providing file access to the server is a ginormous security risk. Use FileTransferSvc instead.

1 Like

As for better debugging, cloud or otherwise, you may want to add a vote or more to the DevOps idea for improved logging support.

https://epicor-manufacturing.ideas.aha.io/ideas/ERP-I-139

1 Like

Try this approach

2 Likes