Saturday, May 31, 2014

Logging in WCF

Have you ever wondered how to log messages sent to a WCF service? I had an iPhone app not being able to connect to a method in a WCF service, so I did this to enable logging of requests:

      <source name="System.ServiceModel.MessageLogging">
                 <add name="messages"
                 initializeData="c:\logs\messages.svclog" />


Then once you have a log file, open it with SvcTraceViewer.exe, the Service Trace Viewer tool from Microsoft.

Saturday, May 17, 2014 Sending logs to a file

It's quite simple to send the console messages from to a file. I followed this tutorial ( and the steps are:

1) Install winston
2) Configure the logger output file
3) Link the logger to using this code:

 var io = require('').listen(server, {
      logger : logger