Logging the swNotificationServer

If you want to set up logging:

  • For versions Olskroken (R43) and earlier, see How to Configure and Start Logging for instructions on creating a swNotificationServer.props file.
  • For versions Kviberg (R44) and later, use the provided swNotificationServer.exe.nlog file. 

swNotificationServer.exe.nlog

<?xml version="1.0" encoding="utf-8" ?>
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema-->
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true">
      <!--internalLogFile="c:\temp\console-example-internal.log"
      internalLogLevel="Info" >-->

  <!-- the targets to write to -->
  <targets>
    <!-- write logs to file -->
      <target xsi:type="File" name="logfile" fileName="NotificationServer.log"
            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />

    <target xsi:type="ColoredConsole" name="logconsole" detectConsoleAvailable="true"
            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />
  </targets>

  <!-- rules to map from logger name to target -->
  <rules>
    <logger name="*" minlevel="Info" writeTo="logfile,logconsole" />
  </rules>
</nlog>
<?xml version="1.0" encoding="utf-8" ?><!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema--><nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      autoReload="true">      <!--internalLogFile="c:\temp\console-example-internal.log"      internalLogLevel="Info" >-->  <!-- the targets to write to -->  <targets>    <!-- write logs to file -->      <target xsi:type="File" name="logfile" fileName="NotificationServer.log"            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />    <target xsi:type="ColoredConsole" name="logconsole" detectConsoleAvailable="true"            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />  </targets>  <!-- rules to map from logger name to target -->  <rules>    <logger name="*" minlevel="Info" writeTo="logfile,logconsole" />  </rules></nlog><?xml version="1.0" encoding="utf-8" ?><!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema--><nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      autoReload="true">      <!--internalLogFile="c:\temp\console-example-internal.log"      internalLogLevel="Info" >-->  <!-- the targets to write to -->  <targets>    <!-- write logs to file -->      <target xsi:type="File" name="logfile" fileName="NotificationServer.log"            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />    <target xsi:type="ColoredConsole" name="logconsole" detectConsoleAvailable="true"            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />  </targets>  <!-- rules to map from logger name to target -->  <rules>    <logger name="*" minlevel="Info" writeTo="logfile,logconsole" />  </rules></nlog>
Generic

To specify a location for the file output, include a valid path for fileName, e.g.,: 


 <!-- write logs to file -->
      <target xsi:type="File" name="logfile" fileName="NotificationServer.log"
            layout="${longdate} [${threadid}] - ${level:uppercase=true}  ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}" />
Generic


If a path is not included, the file will generate in the same location as the notification server executable.


Example Log

2024-05-22 11:53:08.2767 [1] - INFO  Creating TCPMarshaler
2024-05-22 11:53:08.3309 [1] - INFO  Connecting to server...
2024-05-22 11:53:08.3309 [1] - INFO    Connecting to localhost:3333
2024-05-22 11:53:10.3974 [1] - INFO  No SSL
2024-05-22 11:53:10.3974 [1] - INFO  Connected
2024-05-22 11:53:10.3974 [1] - INFO  Verifying Server...
2024-05-22 11:53:10.3974 [1] - INFO  -----BEGIN-----
2024-05-22 11:53:10.3974 [1] - INFO  Connection to SystemWeaver Server Accepted
2024-05-22 11:53:10.3974 [1] - INFO  
2024-05-22 11:53:10.3974 [1] - INFO  -----END-----
2024-05-22 11:53:10.3974 [1] - INFO  SystemWeaver Server Verified
2024-05-22 11:53:11.9890 [1] - INFO  Loading Metadata...
2024-05-22 11:53:12.0836 [1] - INFO  Logged in
2024-05-22 11:53:12.1022 [1] - INFO  Application started. Press Ctrl+C to shut down.
2024-05-22 11:53:12.1231 [1] - INFO  Hosting environment: Production
2024-05-22 11:53:12.1231 [1] - INFO  Content root path: C:\Work\2024-05-22 10.34_22161_30a223e\NotificationServer
2024-05-22 11:53:42.2405 [9] - INFO  SetStatus fired for issue [Project ARC]: Trigger error for signal
2024-05-22 11:53:43.9825 [9] - INFO  Email sent to [email protected]. Status was changed to Started for issue [Project ARC]: Trigger error for signal.
2024-05-22 11:53:49.0052 [9] - INFO  SetStatus fired for issue [Project ARC]: Trigger error for signal
2024-05-22 11:53:50.4434 [9] - INFO  Email sent to [email protected]. Status was changed to Closed for issue [Project ARC]: Trigger error for signal.
2024-05-22 11:53:55.4583 [9] - INFO  SetAssignedTo fired for issue [Project ARC]: Trigger error for signal
2024-05-22 11:53:57.0911 [9] - INFO  Email sent to [email protected], [email protected]. The issue [Project ARC]: Trigger error for signal was assigned to Tracy Klein.
2024-05-22 11:55:47.3726 [10] - INFO  AddNote fired for issue [Project ARC]: Trigger error for signal
2024-05-22 11:55:52.3407 [10] - INFO  Email sent to [email protected], [email protected]. A note was added to issue [Project ARC]: Trigger error for signal.
2024-05-22 12:06:34.5426 [10] - INFO  SetStatus fired for issue [Project ARC]: Trigger error for signal
2024-05-22 12:06:37.7470 [10] - INFO  Email sent to [email protected], [email protected]. Status was changed to Started for issue [Project ARC]: Trigger error for signal.
2024-05-22 12:06:37.7482 [10] - INFO  SetAssignedTo fired for issue [Project ARC]: Trigger error for signal
2024-05-22 12:06:39.2281 [10] - INFO  Email sent to [email protected], [email protected]. The issue [Project ARC]: Trigger error for signal was assigned to Anna Smith.
2024-05-22 12:06:44.2447 [10] - INFO  RequestAddUser fired
2024-05-22 12:06:46.0061 [10] - INFO  Email sent to [email protected]. User Tracy Klein was added to request for status change from Started to Closed for issue [Project ARC]: Trigger error for signal.

Explanation of Log Entries

An entry is added for each event that triggers an email notification. Each entry will provide the Project Name in brackets [ ] followed by the Name of the Issue. 


SetStatus 

The Status of the issue has changed. 


SetAssignedTo 

The Assigned to for the issue has changed.


AddNote

A note has been added to the issue. 


RequestAddUser

An Assignee was added to a Request for status change in the issue.