Got a weird one. I’m simply querying the Db and adding our customers to a list to iterate through, yet when I try to display an info message in the loop I get the following error:
Yes this is a function. Coming from on-prem I would always write to the log using Ice.Diagnostics.Log.WriteEntry(). What is the best way to write to a log on cloud and view it?
I’m so glad you asked! One of the best things they added in 2024.2, I use it in every function now! The code samples are in here. You need to add two references and usings to get it to work.
And then after you write to the log you can pull it down via server file download. Its under User > Logs
Yeah but if you leave it open, after you find the log once, you can just keep hitting download. Its still a billion times better than not being able to write a log file.
As a frequent logger, I found I had to cut back in 2024.x as the log write was moved to the end of processing and I was overwriting the log buffer. The entries were in the server event viewer, but serverlog would be empty for that run.
So if you still want to use WriteEntry it is possible, you just have to judicious about what you are also logging.