aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
index b817d5dcd..06c1a4a23 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs
@@ -13,6 +13,7 @@ using Tango.BL;
using Tango.Core.DB;
using Tango.Core.Helpers;
using Tango.Core.IO;
+using Tango.Logging;
using Tango.PMR.Stubs;
using Tango.PMR.Synchronization;
using Tango.Synchronization.Local;
@@ -22,6 +23,8 @@ namespace Tango.MachineService.Controllers
{
public class SynchronizationController : ApiController
{
+ private LogManager logManager = LogManager.Default;
+
/// <summary>
/// Expects a DB synchronization request from a remote machine and returns the synchronized version of the machine database.
/// </summary>
@@ -73,6 +76,8 @@ namespace Tango.MachineService.Controllers
{
MachineSetupResponse response = new MachineSetupResponse();
+ logManager.Log("Setup request received: " + request.ToString());
+
try
{
using (ObservablesContext db = ObservablesContext.CreateDefault(GetLocalServerAddress()))
@@ -119,6 +124,7 @@ namespace Tango.MachineService.Controllers
}
catch (Exception ex)
{
+ logManager.Log(ex);
OnError(HttpStatusCode.InternalServerError, ex.Message);
}
@@ -267,7 +273,7 @@ namespace Tango.MachineService.Controllers
return response;
}
-
+
#region Helpers
private void OnError(HttpStatusCode code, String message)