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.
This commit is contained in:
@@ -175,13 +175,14 @@ namespace umbraco.BusinessLogic
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.WriteLine(e.ToString(), "Error");
|
||||
Trace.WriteLine(e.ToString());
|
||||
LogHelper.Error<Log>("An error occurred adding an audit trail log to the umbracoLog table", e);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Info<Log>(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<Log>(
|
||||
"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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user