Search In
There is no UmbracoLog table in v5. When errors say for more info see the Umbraco log, where do I look?
Hi Andrew,
V5 is using log4net(http://logging.apache.org/log4net/ ) Logs are stored in App_Data\Logs
Hope this helps,
Richard
yes logs are stored in text files under App_Data\Logs.
But one more question : If i want to write logs thru my partial views, how to do that? In other words how to write our own logs into the same log files?
Hi,
reference Umbraco.Framework.Diagnostics and use LogHelper
@using Umbraco.Framework.Diagnostics
@{
LogHelper.Warn<string>("Hello logger");
}
Cheers
Or
LogHelper.TraceIfEnabled<string>(() => { return "Hello logger";});
Hi there, all great answers. One other tip is that because we just use standard log4net, if you'd prefer to log to a database, or change which items get logged, you can do so by editing the App_Data/Umbraco/Config/log4net.config file
Wow... Thanks Richard & Alex
One more que: How to enable tracing in U5 just we use to do in U4.x using umbDebugShowTrace=true?
At the moment its on by default. In log4net.config you can change the log levels that get output. Info has been set for root, so traceing is on I guess
i think i kept my question in workng way.
Does U5 supports the functionality (umbDebugShowTrace=true) that we have in U4.x.With this entry in query string and one more web.config chage we can see on screen information about macros used on the page. http://our.umbraco.org/wiki/how-tos
Something that I find useful as well is to use your current class type, like this:
LogHelper.Warn<MyClassName>("Hello logger");
LogHelper.TraceIfEnabled<MyClassName>(() => { return "Hello logger"; });
That way your log messages will appear with the class name next to it, which can be helpful when trying to track down errors in your code.