Copied to clipboard

Flag this post as spam?

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


  • Mitch Olinsky 31 posts 51 karma points
    Sep 29, 2011 @ 00:33
    Mitch Olinsky
    0

    Courier Audit Logs

    Does courier track when and who uses it?

    The best I can see is the following error in the Audit Trail

     

    Action: error

    Comment:

    Error adding to SiteMapProvider: System.InvalidOperationException: Multiple nodes with the same URL '/' were found.  XmlSiteMapProvider requires that sitemap nodes have unique URLs. at System.Web.StaticSiteMapProvider.AddNode(SiteMapNode node, SiteMapNode parentNode) at umbraco.presentation.nodeFactory.UmbracoSiteMapProvider.loadNodes (String parentId, SiteMapNode parentNode)

  • Mitch Olinsky 31 posts 51 karma points
    Oct 05, 2011 @ 21:37
    Mitch Olinsky
    0

    So I'm real close on this one.  Just one piece missing, I hope somebody can help me out.

    I created an event handler that adds a log entry for every page and every dependancy.  But I don't know how to get the user who initiated the Courier push for the log entry.

     

    Here's the code so far:

    Umbraco.Courier.Core.ExtractionManager.Instance.PostProcessedItem += new EventHandler<Umbraco.Courier.Core.ItemEventArgs>(Instance_PostProcessedItem);

            void Instance_PostProcessedItem(object sender, Umbraco.Courier.Core.ItemEventArgs e)
            {
                if (e.Item.GetType().ToString() == "Umbraco.Courier.ItemProviders.Document")
                {
                    Log.Add(LogTypes.Custom, GetIDFromFileName(e.Item.CourierFileName), "Content Approved - " +
                    "Name: " + e.Item.Name + " " +
                    "ItemType: " + e.Item.ItemType + " " +
                    "Status: " + e.Item.Status
                    );

                    //Email(umbraco.BusinessLogic.User.GetCurrent().ToString(),"" + Convert.ToString(1));
                }
                else
                {
                    Log.Add(LogTypes.Custom, 0, "Content Dependancy Published " +
                    "Name: " + e.Item.Name + " " +
                    "ItemType: " + e.Item.ItemType + " " +
                    "Status: " + e.Item.Status
                    );
                }
            }

  • Gleb Kaplan 47 posts 123 karma points
    May 09, 2016 @ 11:09
Please Sign in or register to post replies

Write your reply to:

Draft