Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Jan 28, 2010 @ 09:56
    Jonas Eriksson
    0

    Generate log row on xslt error?

    Sometimes a xslt generates an error on a live site, is there a way to log those errors?

    TIA /

    Jonas

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jan 28, 2010 @ 10:23
    Sebastiaan Janssen
    0

    Hmm, is this like the error that outputs something like: "Error in Something.xslt" ? 

    This is something that's in a catch block, so the error is completely handled. The only thing I can think of right now is changing the core.. 

    This is the code: 

    catch (Exception e)
    {
     HttpContext.Current.Trace.Warn("umbracoMacro", "Error loading XSLT " + xsltFile, e);
     return new LiteralControl("Error reading XSLT file: \\xslt\\" + XsltFile);
    }
  • Jonas Eriksson 930 posts 1825 karma points
    Jan 28, 2010 @ 10:46
    Jonas Eriksson
    0

    Hi, yes, and Error parsing...

    I do think that logging those errors would be a great feature to have, I even saw error messages of that kind here att umbraco.org :)

    Regards

    Jonas

  • Jonas Eriksson 930 posts 1825 karma points
    Jan 28, 2010 @ 10:57
    Jonas Eriksson
    0

    It's possible to connect that log trace to system diagnostics, and a log file. Someone did that? If not, I will dig in to that l8. (Should be filtered so only warnings & errors are written).

    http://msdn.microsoft.com/en-us/library/b0ectfxd%28VS.80%29.aspx

     

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jan 28, 2010 @ 11:05
    Sebastiaan Janssen
    0

    It would be very nice if a WebPageTraceListener could somehow be tied to ELMAH. It certainly is very handy to know when the XSLT files fail when you're not looking.

    And yes, it should definitely be filtered, I don't need a 100 emails per page request.. ;-)

  • Jonas Eriksson 930 posts 1825 karma points
    Jan 29, 2010 @ 08:17
    Jonas Eriksson
    0

    I really think that xslt-errors should be sent to the umbracoLog as well as to the trace.

    BusinessLogic.Log.Add(BusinessLogic.LogTypes.Error,BusinessLogic.User.GetUser(0),-1,"Log message");
  • Jonas Eriksson 930 posts 1825 karma points
    Feb 09, 2010 @ 08:27
    Jonas Eriksson
    0

    Now I got that error here on our

    Error parsing XSLT file: \xslt\forum-topicsYouParticipated.xslt

     

  • Jonas Eriksson 930 posts 1825 karma points
    Oct 03, 2010 @ 09:23
Please Sign in or register to post replies

Write your reply to:

Draft