0
Completed

Adding logging to your Linux server

Timothy Huynh 4 days ago updated 4 days ago 1

Hey all,

Largely a copy and paste from one of my other posts here but this should result in a relatively clean log such that if runtime exceptions pop up that coincide with incorrect behavior on the server, it should (hopefully) present some correlation between the 2 events. Thanks!


Adding log collection

First, stop the screenconnect server by running "sudo /etc/init.d/screenconnect stop". We've found that stopping the server first reduces the noise in the debug logs (as opposed to restarting the server).

Under the <system.serviceModel> tag in the web.config, add the following:

<behaviors>
  <serviceBehaviors>
    <behavior name="debug">
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

I.e, your web.config's system.serviceModel section should look similar to this:

<system.serviceModel>
  ...other stuff
  <behaviors>
    <serviceBehaviors>
      <behavior name="debug">
        <serviceDebug includeExceptionDetailInFaults="true" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>

Next, find <service name="ScreenConnect.SessionManager"> and change it to <service name="ScreenConnect.SessionManager" behaviorConfiguration="debug">.

Finally, start the service in debug mode by running "sudo /etc/init.d/screenconnect debug > ~/Desktop/monoDebugLogs.txt 2>&1".