Firstly, it is not supported. If errors occur, it displays html and writes to the asp.net trace log.
. Umbraco Elmah log4net . .
using System;
using System.Linq;
using System.Web;
public class MacroLogging : IHttpModule {
public void Init(HttpApplication context) {
context.LogRequest += ContextLogRequest;
}
static void ContextLogRequest(object source, EventArgs e) {
var app = (HttpApplication)source;
var context = app.Context;
context.Trace.TraceFinished += TraceFinished;
}
static void TraceFinished(object sender, TraceContextEventArgs e) {
var records = e.TraceRecords.Cast<TraceContextRecord>();
var categoryTypes = new[] {"Macro", "macro", "umbracoMacro"};
var traceOutput = records.Where(p => categoryTypes.Contains(p.Category) && p.IsWarning)));
foreach (var entry in traceOutput) {
}
}
public void Dispose() {}
}
web.config. 1am:), .