0

I have a WCF service with NLog logging in C#. This service references 3 class libraries. Every projects uses NLog logging.

In Debug mode everything works fine, every projects logs to the specified log file successfully. I use async file target.

In production mode I have a Windows Service that hosts the above WCF Service. This Windows Service contains the NLog package too.

After I install my Windows service I see only log messages from Windows Service and not from the WCF Service and the other class libraries.

How can I receive log messages to file from WCF Service after it's hosted by a Windows Service?

Thank you!

SZL
  • 805
  • 8
  • 12
  • Look at the log message of the Windows service to see if there is an error message. – Jiayao Aug 10 '21 at 07:20
  • No, there are no error, I see only my debug messages (from the Windows Service). The other projects not produces any logs. – SZL Aug 10 '21 at 07:51
  • See if the answers in the link can help you : [Logging Events in a Windows Service Program](https://stackoverflow.com/questions/8160277/logging-events-in-a-windows-service-program) . – Jiayao Aug 11 '21 at 07:23

0 Answers0