SeriLog Self Logging

@Bart_Elia @JeffLeBert Is it possible to add Serilog Self Logging with just the Task Agent config? Also, can we request a few more sinks (we need Slack) so we don’t have to manually add them after every upgrade? Thanks!

And an Azure sink too…for us cloud users…

@John_Mitchell, when you say “Serilog Self Logging” do you mean this: Debugging and Diagnostics · serilog/serilog Wiki · GitHub

@Mark_Wonsil when you say “Azure sink”, do you mean Application Insights? You can set that through the configuration file. Right now we support the file and App Insights sinks.

@JeffLeBert We’re Public Cloud, so we have to contact the Cloud Team for any errors because they are logged to the server. What we cloud users would like is the ability to see those errors. Even if we send it to cheap blob storage would be great. We just don’t have access to the config file - and shouldn’t. But we SHOULD be able to see errors. Looking up error logs is not a value-add for the Cloud Team. :wink:

Thanks!!!

<Warning>No promises are being made in the following statements!</Warning>

Some level of “self service” is being talked about. This thread was about Serilog in Task Agent, but I think you are talking more about the App Server logs. For App Server logging in the Public Cloud, we would like you to be able to see any logging for your company. When and how much is a question that is above my pay grade.

<Warning>No promises were made in the previous statements!</Warning>

2 Likes

@JeffLeBert Yes, my thought was that it would be nice if there was a log of the logging process itself. I was trying to debug manually adding a new sink but I can’t find anyway to see the errors from the actual logging process.

IMHO, this is not just a Cloud issue. For good IT controls, everyone should operate with least permissions possible in all things to prevent malware transmission, etc. All users should be using a different account when browsing the web, reading email, etc than one that has privileges that can do damage. Users and Devs should not be logging into the server with their own accounts to view logs, change configs, etc. Epicor made the security decision not to send error messages to the client but the total risk of Epicor users might actually go up if users have access to the server. This is less true for Cloud users but asking the cloud team help users debug their code instead of managing infrastructure is wasting valuable time and talent, IMHO. :slight_smile:

So I hope we move from talking about self-service to simple solutions like adding a sink to the server that cloud users can use the Server File Download to see appLog, MRP, and other task messages all the way up to sending the logs to an Azure account for automated monitoring. Again, this would a benefit not just for cloud users but all users.

Thanks for all you do! Especially listening to rants from rando old guys…

@Mark_Wonsil There are tons of sinks where you can pipe the logs. (sheesh these names)

Indeed. Serilog (and many other logging tools) can do it all, I just don’t have access to the config file to add/change them.

:rofl:

@Mark_Wonsil, I guess all I can say is that this is a known problem. I don’t have a solution for you today. :frowning:

1 Like

But at least there’s talk about it so that’s good to know. I’m just being the voice of the customer here to surface these things. The Epicor culture is still very much an on-prem mentality and, like the rest of us, it just takes time to feel our way into new and different methodologies. We’ll get there. Thanks!!!

2 Likes

@John_Mitchell… It sounds like you are trying to add sinks to the C:\Program Files (x86)\Epicor Software\Epicor Task Agent Service 3.2.###.0\TaskAgentService.exe.config file. We use the Serilog.Settings.AppSettings to read from that *.config file as talked about here: https://github.com/serilog/serilog/wiki/AppSettings.

I’m also assuming you are dropping the assemblies for the appropriate Serilog sinks into the above directory. You will see we have File and Application Insights sinks already there. I haven’t played around with other Serilog sinks so I can’t give any specific advice there.

With the right settings in the TaskAgentService.exe.config file and the right Serilog sink assemblies, you should be able to write you logs wherever you like.

I haven’t played with the SelfLogger so I’m not sure how to hook that up through the *.config file, if you even can.

@JeffLeBert That’s exactly what I did. I just forgot that our sandbox is on a virtual lan without any outbound access. But while I was trying to debug the issue I really wished I could have a log for the logger.

The request is that you enable logging for SeriLog. As users add more and more sinks, trying to debug why some of them aren’t working can get difficult. Ideally, we would be able to enable self logging in the config. Thanks

2 Likes

What Serilog sink are you trying to set up? If a specific one is popular then maybe we would start supporting it out of the box.

I have not used SeriLog yet in general, I see many people use it…

However I have been using NLog for a few years now in my projects and it comes with 30 targets out of the box such as:

It all is maintained by the .sysconfig

I am eager to use SeriLog in my next project, its trending!

@JeffLeBert We need Slack.

I know you didn’t ask but the reason is too beautiful not to share. There is currently a bug where if you post a consolidated PO invoice on the last day of the month it causes the MC Processing tasks to hang and eventually fills up the Task Agent queue stopping everything. The current workaround from support is… to not post invoices on the last day of the month :man_facepalming:

BTW, I have started using the same logic at home. My wife complained that the house was cold this morning and my suggestion was: don’t be in the house. She didn’t laugh.

I can only imagine your customer request stories are even better than that though.

Similar to your story. Many years ago I called a company to report a bug in their software. They said they couldn’t take a bug report at this time because they have no known bugs. I tried explaining why this was illogical, but they held the line. Now they are out of business. :slight_smile: