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