From 116a87f5c54fd4e081d8226e7a663c74705a8e10 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Thu, 27 Dec 2012 17:22:08 +0300 Subject: [PATCH] Updated an error logging call in the Log class. Changed the redirected logging to use the lazy overload in case Info isn't enabled in the config. --- src/umbraco.businesslogic/Log.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/umbraco.businesslogic/Log.cs b/src/umbraco.businesslogic/Log.cs index 6e0e2e1b28..ec06ac0174 100644 --- a/src/umbraco.businesslogic/Log.cs +++ b/src/umbraco.businesslogic/Log.cs @@ -175,13 +175,14 @@ namespace umbraco.BusinessLogic } catch (Exception e) { - Debug.WriteLine(e.ToString(), "Error"); - Trace.WriteLine(e.ToString()); + LogHelper.Error("An error occurred adding an audit trail log to the umbracoLog table", e); } } else { - LogHelper.Info(string.Format("Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: {0} | User: {1} | NodeId: {2} | Comment: {3}", type.ToString(), userId, nodeId.ToString(CultureInfo.InvariantCulture), comment)); + LogHelper.Info( + "Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: {0} | User: {1} | NodeId: {2} | Comment: {3}", + () => type.ToString(), () => userId, () => nodeId.ToString(CultureInfo.InvariantCulture), () => comment); } }