diff --git a/Perspex.Base/PerspexObject.cs b/Perspex.Base/PerspexObject.cs index 7c2db48fda..c2d0387763 100644 --- a/Perspex.Base/PerspexObject.cs +++ b/Perspex.Base/PerspexObject.cs @@ -457,12 +457,12 @@ namespace Perspex this.values.Add(property, v); } - this.Log().Debug(string.Format( + this.Log().Debug( "Set local value of {0}.{1} (#{2:x8}) to {3}", this.GetType().Name, property.Name, this.GetHashCode(), - value)); + value); v.Replace(Observable.Never().StartWith(value), Priority); } @@ -506,12 +506,12 @@ namespace Perspex this.values.Add(property, v); } - this.Log().Debug(string.Format( + this.Log().Debug( "Bound value of {0}.{1} (#{2:x8}) to {3}", this.GetType().Name, property.Name, this.GetHashCode(), - description != null ? description.Description : "[Anonymous]")); + description != null ? description.Description : "[Anonymous]"); if (priority == BindingPriority.LocalValue) { @@ -582,13 +582,13 @@ namespace Perspex { this.RaisePropertyChanged(property, oldValue, newValue); - this.Log().Debug(string.Format( + this.Log().Debug( "Value of {0}.{1} (#{2:x8}) changed from {3} to {4}", this.GetType().Name, property.Name, this.GetHashCode(), oldValue, - newValue)); + newValue); } }); diff --git a/Perspex.Controls/TemplatedControl.cs b/Perspex.Controls/TemplatedControl.cs index c7f2732132..ff9e6a0047 100644 --- a/Perspex.Controls/TemplatedControl.cs +++ b/Perspex.Controls/TemplatedControl.cs @@ -60,10 +60,10 @@ namespace Perspex.Controls { if (this.Template != null) { - this.Log().Debug(string.Format( + this.Log().Debug( "Creating template for {0} (#{1:x8})", this.GetType().Name, - this.GetHashCode())); + this.GetHashCode()); var child = this.Template.Build(this); this.AddVisualChild(child); diff --git a/Perspex.Layout/Layoutable.cs b/Perspex.Layout/Layoutable.cs index 60a9b17a55..3dfe9e059c 100644 --- a/Perspex.Layout/Layoutable.cs +++ b/Perspex.Layout/Layoutable.cs @@ -125,20 +125,20 @@ namespace Perspex.Layout availableSize = availableSize.Deflate(this.Margin); this.DesiredSize = this.MeasureCore(availableSize).Constrain(availableSize); - this.Log().Debug(string.Format( + this.Log().Debug( "Measure of {0} (#{1:x8}) requested {2} ", this.GetType().Name, this.GetHashCode(), - this.DesiredSize)); + this.DesiredSize); } public void Arrange(Rect rect) { - this.Log().Debug(string.Format( + this.Log().Debug( "Arrange of {0} (#{1:x8}) gave {2} ", this.GetType().Name, this.GetHashCode(), - rect)); + rect); if (this.DesiredSize.HasValue) { diff --git a/Perspex.SceneGraph/Visual.cs b/Perspex.SceneGraph/Visual.cs index 16101bf646..cbab16719e 100644 --- a/Perspex.SceneGraph/Visual.cs +++ b/Perspex.SceneGraph/Visual.cs @@ -248,10 +248,10 @@ namespace Perspex private void NotifyAttachedToVisualTree(IRenderRoot root) { - this.Log().Debug(string.Format( + this.Log().Debug( "Attached {0} (#{1:x8}) to visual tree", this.GetType().Name, - this.GetHashCode())); + this.GetHashCode()); this.OnAttachedToVisualTree(root); @@ -266,10 +266,10 @@ namespace Perspex private void NotifyDetachedFromVisualTree(IRenderRoot oldRoot) { - this.Log().Debug(string.Format( + this.Log().Debug( "Detached {0} (#{1:x8}) from visual tree", this.GetType().Name, - this.GetHashCode())); + this.GetHashCode()); this.OnDetachedFromVisualTree(oldRoot); diff --git a/TestApplication/Program.cs b/TestApplication/Program.cs index d2405ce871..e7f869f077 100644 --- a/TestApplication/Program.cs +++ b/TestApplication/Program.cs @@ -1,5 +1,6 @@ using Perspex; using Perspex.Controls; +using Perspex.Diagnostics; using Perspex.Layout; using Perspex.Media; using Perspex.Media.Imaging; @@ -82,8 +83,8 @@ namespace TestApplication static void Main(string[] args) { - //LogManager.Enable(new TestLogger()); - //LogManager.Instance.LogLayoutMessages = true; + LogManager.Enable(new TestLogger()); + LogManager.Instance.LogLayoutMessages = true; App application = new App {