From 979e73def997ac3e799810fa1290e79f050dc73a Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Thu, 8 May 2014 14:30:44 -0400 Subject: [PATCH] Logging improvements --- Web/ViewModels/Log/LogViewModel.cs | 4 ++-- Web/ViewModels/User/CreateUserViewModel.cs | 7 +++++++ Web/ViewModels/User/EditUserViewModel.cs | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Web/ViewModels/Log/LogViewModel.cs b/Web/ViewModels/Log/LogViewModel.cs index 00c0428..01446b5 100644 --- a/Web/ViewModels/Log/LogViewModel.cs +++ b/Web/ViewModels/Log/LogViewModel.cs @@ -151,8 +151,8 @@ namespace MileageTraker.Web.ViewModels.Log public override string ToString() { return string.Format( - "vehicle: {0}, odo: {1}, type: {2}, city: {3}, gas: {4}, purpose: {5}, date: {6}", - VehicleId, EndOdometer, LogType, CityName, GasPurchased, Purpose, Date.ToShortDateString()); + "vehicle: {0}, odo: {1}, type: {2}, city: {3}, gas: {4}, purpose: {5}, date: {6}, user: {7}", + VehicleId, EndOdometer, LogType, CityName, GasPurchased, Purpose, Date.ToShortDateString(), UserFullName); } } } \ No newline at end of file diff --git a/Web/ViewModels/User/CreateUserViewModel.cs b/Web/ViewModels/User/CreateUserViewModel.cs index 51f8984..224076b 100644 --- a/Web/ViewModels/User/CreateUserViewModel.cs +++ b/Web/ViewModels/User/CreateUserViewModel.cs @@ -46,5 +46,12 @@ namespace MileageTraker.Web.ViewModels.User Mapper.Map(this, user); return user; } + + public override string ToString() + { + return string.Format( + "FullName: {0}, UserName: {1}, email: {2}", + FullName, Username, Email); + } } } \ No newline at end of file diff --git a/Web/ViewModels/User/EditUserViewModel.cs b/Web/ViewModels/User/EditUserViewModel.cs index 849785b..c938ae1 100644 --- a/Web/ViewModels/User/EditUserViewModel.cs +++ b/Web/ViewModels/User/EditUserViewModel.cs @@ -52,5 +52,12 @@ namespace MileageTraker.Web.ViewModels.User user.FullName = FullName; user.Email = Email; } + + public override string ToString() + { + return string.Format( + "FullName: {0}, UserName: {1}, email: {2}", + FullName, Username, Email); + } } } \ No newline at end of file