HTML to PDF/RTF Java converter and tools › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › Debugging PD4ML in a .NET Windows Service › Re: Re: Debugging PD4ML in a .NET Windows Service
I’ve forwarded the question to our .NET team. I’ll let you know as soon as we have new info.
Much appreciated! However, we figured out it out. See below.
1. In the OnStart function of Windows Service Host class, add the following code:
Console.SetError(New System.IO.StreamWriter("[filename]")<br />
2. Then in the OnStop function, add the following code:
I’m sure there are other ways to do this such as creating your own custom System.Diagnostics listener, but this way works too. One thing to note is that you will need to stop the service in order to see the logs that were written.