Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 537df2c

Browse files
committed
Improve cache trace messages
1 parent 3b76bf2 commit 537df2c

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public GitBranch[] LocalBranches
488488
var now = DateTimeOffset.Now;
489489
var isUpdated = false;
490490

491-
Logger.Trace("Updating: {0} localBranches:{1}", now, value);
491+
Logger.Trace("{0} Updating LocalBranches: current:{1} new:{2}", now, localBranches, value);
492492

493493
var localBranchesIsNull = localBranches == null;
494494
var valueIsNull = value == null;
@@ -512,7 +512,7 @@ public GitBranch[] RemoteBranches
512512
var now = DateTimeOffset.Now;
513513
var isUpdated = false;
514514

515-
Logger.Trace("Updating: {0} remoteBranches:{1}", now, value);
515+
Logger.Trace("{0} Updating RemoteBranches: current:{1} new:{2}", now, remoteBranches, value);
516516

517517
var remoteBranchesIsNull = remoteBranches == null;
518518
var valueIsNull = value == null;
@@ -536,7 +536,7 @@ public GitRemote[] Remotes
536536
var now = DateTimeOffset.Now;
537537
var isUpdated = false;
538538

539-
Logger.Trace("Updating: {0} remotes:{1}", now, value);
539+
Logger.Trace("{0} Updating Remotes: current:{1} new:{2}", now, remotes, value);
540540

541541
var remotesIsNull = remotes == null;
542542
var valueIsNull = value == null;
@@ -671,7 +671,7 @@ public List<GitLogEntry> Log
671671
var now = DateTimeOffset.Now;
672672
var isUpdated = false;
673673

674-
Logger.Trace("Updating: {0} gitLog:{1}", now, value);
674+
Logger.Trace("{0} Updating Log: current:{1} new:{2}", now, log.Count, value.Count);
675675

676676
if (!log.SequenceEqual(value))
677677
{
@@ -707,8 +707,7 @@ public int Ahead
707707
var now = DateTimeOffset.Now;
708708
var isUpdated = false;
709709

710-
Logger.Trace("Updating: {0} ahead:{1}", now, value);
711-
710+
Logger.Trace("{0} Updating Ahead: current:{1} new:{2}", now, ahead, value);
712711
if (ahead != value)
713712
{
714713
ahead = value;
@@ -731,7 +730,7 @@ public int Behind
731730
var now = DateTimeOffset.Now;
732731
var isUpdated = false;
733732

734-
Logger.Trace("Updating: {0} behind:{1}", now, value);
733+
Logger.Trace("{0} Updating Behind: current:{1} new:{2}", now, behind, value);
735734

736735
if (behind != value)
737736
{
@@ -766,7 +765,7 @@ public List<GitStatusEntry> Entries
766765
var now = DateTimeOffset.Now;
767766
var isUpdated = false;
768767

769-
Logger.Trace("Updating: {0} entries:{1}", now, value.Count);
768+
Logger.Trace("{0} Updating Entries: current:{1} new:{2}", now, entries.Count, value.Count);
770769

771770
if (!entries.SequenceEqual(value))
772771
{
@@ -801,7 +800,7 @@ public List<GitLock> GitLocks
801800
var now = DateTimeOffset.Now;
802801
var isUpdated = false;
803802

804-
Logger.Trace("Updating: {0} gitLocks:{1}", now, value);
803+
Logger.Trace("{0} Updating GitLocks: current:{1} new:{2}", now, gitLocks.Count, value.Count);
805804

806805
if (!gitLocks.SequenceEqual(value))
807806
{
@@ -837,7 +836,7 @@ public string Name
837836
var now = DateTimeOffset.Now;
838837
var isUpdated = false;
839838

840-
Logger.Trace("Updating: {0} Name:{1}", now, value);
839+
Logger.Trace("{0} Updating Name: current:{1} new:{2}", now, gitName, value);
841840

842841
if (gitName != value)
843842
{
@@ -861,7 +860,7 @@ public string Email
861860
var now = DateTimeOffset.Now;
862861
var isUpdated = false;
863862

864-
Logger.Trace("Updating: {0} Email:{1}", now, value);
863+
Logger.Trace("{0} Updating Email: current:{1} new:{2}", now, gitEmail, value);
865864

866865
if (gitEmail != value)
867866
{

src/tests/IntegrationTests/CachingClasses.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ public GitBranch[] LocalBranches
459459
var now = DateTimeOffset.Now;
460460
var isUpdated = false;
461461

462-
Logger.Trace("Updating: {0} localBranches:{1}", now, value);
462+
Logger.Trace("{0} Updating LocalBranches: current:{1} new:{2}", now, localBranches, value);
463463

464464
var localBranchesIsNull = localBranches == null;
465465
var valueIsNull = value == null;
@@ -483,7 +483,7 @@ public GitBranch[] RemoteBranches
483483
var now = DateTimeOffset.Now;
484484
var isUpdated = false;
485485

486-
Logger.Trace("Updating: {0} remoteBranches:{1}", now, value);
486+
Logger.Trace("{0} Updating RemoteBranches: current:{1} new:{2}", now, remoteBranches, value);
487487

488488
var remoteBranchesIsNull = remoteBranches == null;
489489
var valueIsNull = value == null;
@@ -507,7 +507,7 @@ public GitRemote[] Remotes
507507
var now = DateTimeOffset.Now;
508508
var isUpdated = false;
509509

510-
Logger.Trace("Updating: {0} remotes:{1}", now, value);
510+
Logger.Trace("{0} Updating Remotes: current:{1} new:{2}", now, remotes, value);
511511

512512
var remotesIsNull = remotes == null;
513513
var valueIsNull = value == null;
@@ -641,7 +641,7 @@ public List<GitLogEntry> Log
641641
var now = DateTimeOffset.Now;
642642
var isUpdated = false;
643643

644-
Logger.Trace("Updating: {0} gitLog:{1}", now, value);
644+
Logger.Trace("{0} Updating Log: current:{1} new:{2}", now, log.Count, value.Count);
645645

646646
if (!log.SequenceEqual(value))
647647
{
@@ -676,7 +676,7 @@ public int Ahead
676676
var now = DateTimeOffset.Now;
677677
var isUpdated = false;
678678

679-
Logger.Trace("Updating: {0} ahead:{1}", now, value);
679+
Logger.Trace("{0} Updating Ahead: current:{1} new:{2}", now, ahead, value);
680680

681681
if (ahead != value)
682682
{
@@ -700,7 +700,7 @@ public int Behind
700700
var now = DateTimeOffset.Now;
701701
var isUpdated = false;
702702

703-
Logger.Trace("Updating: {0} behind:{1}", now, value);
703+
Logger.Trace("{0} Updating Behind: current:{1} new:{2}", now, behind, value);
704704

705705
if (behind != value)
706706
{
@@ -734,7 +734,7 @@ public List<GitStatusEntry> Entries
734734
var now = DateTimeOffset.Now;
735735
var isUpdated = false;
736736

737-
Logger.Trace("Updating: {0} entries:{1}", now, value.Count);
737+
Logger.Trace("{0} Updating Entries: current:{1} new:{2}", now, entries.Count, value.Count);
738738

739739
if (!entries.SequenceEqual(value))
740740
{
@@ -768,7 +768,7 @@ public List<GitLock> GitLocks
768768
var now = DateTimeOffset.Now;
769769
var isUpdated = false;
770770

771-
Logger.Trace("Updating: {0} gitLocks:{1}", now, value);
771+
Logger.Trace("{0} Updating GitLocks: current:{1} new:{2}", now, gitLocks.Count, value.Count);
772772

773773
if (!gitLocks.SequenceEqual(value))
774774
{
@@ -803,7 +803,7 @@ public string Name
803803
var now = DateTimeOffset.Now;
804804
var isUpdated = false;
805805

806-
Logger.Trace("Updating: {0} Name:{1}", now, value);
806+
Logger.Trace("{0} Updating Name: current:{1} new:{2}", now, gitName, value);
807807

808808
if (gitName != value)
809809
{
@@ -827,7 +827,7 @@ public string Email
827827
var now = DateTimeOffset.Now;
828828
var isUpdated = false;
829829

830-
Logger.Trace("Updating: {0} Email:{1}", now, value);
830+
Logger.Trace("{0} Updating Email: current:{1} new:{2}", now, gitEmail, value);
831831

832832
if (gitEmail != value)
833833
{

0 commit comments

Comments
 (0)