Server Log Message in Functions

I am relatively new to functions and raised a ticket with Epicor a few months ago as when I used the Log Message widget, or added custom code to write to the server log the messages were not showing. The function will run but the Server Log doesn’t show the message.

Am I doing something wrong as I have been advised by Epicor \ Development that everything works as it should. They showed me the server log showing the function had run and even though it didn’t show the message they said it was correct.

So I guess my question is: Is there a better way for me to track each stage of my function\bpm than the original way I was taught in Vantage using log messages?

I tend to use this in code:

Ice.Diagnostics.Log.WriteEntry("Words");

That will log to the event viewer on the server and will log even if the code crashes which you won’t get with other message services.

4 Likes

Hi. Yes, that is exactly what I use in Data\Method directives but if I use it in a function (even just a function with only that line of code!) it doesn’t show in the Server Log :confused:

2 Likes

That’s interesting because that’s all I ever use in functions. :thinking:

1 Like

Try again, afair there was a bug fixed long ago

2 Likes

Do you know what version it was fixed in (we are 2023.2)?

1 Like

This is what I meant Log Message in Function throws error on save

1 Like

I use this code and the error message is displayed in the event viewer → Applications and Services Logs → Epicor App Server

1 Like

Thanks but unfortunately that’s not my issue as it’s not creating \ saving function that is the problem but that the message doesn’t actually show in the server log. Appreciate the link though

Thanks Andrew. Appreciate the information and am aware I can connect onto the server and review the logs but it’s just easier to open the server log with Notepad on my client!

How do you get server log on the client?

Apologies that wasn’t worded very well. What I meant was I access File Explorer using my (client) laptop and browse a path to the Server Logs