Skip to content

Commit

Permalink
Add more logging for loading and saving trips.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alina Popa committed May 13, 2016
1 parent 8f8d72b commit 43d1e89
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public async Task<bool> SaveRecordingTripAsync(string name = "")
IsBusy = false;
progress?.Dispose();
}

Logger.Instance.Track("SaveRecording failed");
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ public async Task<bool> ExecuteLoadTripCommandAsync(string id)
if (IsBusy)
return false;

Logger.Instance.Track("LoadPastTrip");

var progress = Acr.UserDialogs.UserDialogs.Instance.Loading("Loading trip details...",
maskType: Acr.UserDialogs.MaskType.Clear);

Expand Down Expand Up @@ -143,15 +141,18 @@ public async Task<bool> ExecuteLoadTripCommandAsync(string id)
POIs.AddRange(await StoreManager.POIStore.GetItemsAsync(Trip.Id));

Title = Trip.Name;
Logger.Instance.Track("LoadPastTrip");
}
else
{
Logger.Instance.Track("LoadPastTrip: no trip points!");
error = true;
}

}
catch (Exception ex)
{
Logger.Instance.Track("Error loading past trip!");
Logger.Instance.Report(ex);
error = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ public async Task ExecuteLoadPastTripsCommandAsync()
if (IsBusy)
return;

var track = Logger.Instance.TrackTime("LoadTrips");
track?.Start();

var progressDialog = UserDialogs.Instance.Loading("Loading trips...", maskType: MaskType.Clear);

try
Expand All @@ -84,14 +81,15 @@ public async Task ExecuteLoadPastTripsCommandAsync()
Trips.ReplaceRange(items);

CanLoadMore = Trips.Count == 25;
Logger.Instance.Track("LoadTrips");
}
catch (Exception ex)
{
Logger.Instance.Report(ex);
Logger.Instance.Track("Loading trips failed");
}
finally
{
track?.Stop();
IsBusy = false;

progressDialog?.Dispose();
Expand Down

0 comments on commit 43d1e89

Please sign in to comment.