Thank your for the answer, i have seen several articles about how to add new logs, and stuff like this also, howwever there must be a simple way, in v4 i would use: umbraco.BusinessLogic.Log.Add, but it now says that is shsould use LogHelper, however when trying to do so in an UmbracoApiController, i get, that:
Umbraco.Web.UmbracoHelper does not contains a definition for Code ...
What is the correct way to write to UmbracoTraceLog.txt in Umbraco 7
The title says it all. It should be very simple, but i cannot find it?
I have an ApiController and just need a couple of log lines, to identify a specific problem
br
Michael
Hi Michael
Perhaps this article by Ismail Mayat can help? http://24days.in/umbraco/2013/log4net-in-umbraco/
/Jan
Thank your for the answer, i have seen several articles about how to add new logs, and stuff like this also, howwever there must be a simple way, in v4 i would use: umbraco.BusinessLogic.Log.Add, but it now says that is shsould use LogHelper, however when trying to do so in an UmbracoApiController, i get, that:
Umbraco.Web.UmbracoHelper does not contains a definition for Code ...
What am i missing?
OK, answering myself, addding
using Umbraco.Core.Logging;
then you can call:
LogHelper.Info(this.GetType(),string.Format("blblb"));
is working on a reply...