Copied to clipboard

Flag this post as spam?

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


  • Tony 99 posts 156 karma points
    Jun 01, 2015 @ 13:22
    Tony
    0

    Entries not showing?

    I installed this on 7.2.4 and it seems to read to log files ok, but its not displaying the content?

     

  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Jun 01, 2015 @ 13:50
    Dan Diplo
    0

    Hmmm, I do have it installed on a few 7.2.4 sites and it does work OK on those.

    Are there any error messages in the browser console (F12) you can see?

    Sometimes caching can be extreme in Umbraco back-end, so are you able to flush cache? (I usually use Chrome dev tools - F12 - and disable cache - see https://developer.chrome.com/devtools/docs/settings). Sometimes an app pool restart also helps (or touch web.config).

    If none of that works, then are you able to send me copies of some of the log files to test? There might be something strange in their formatting...

     

     

     

  • Tony 99 posts 156 karma points
    Jun 02, 2015 @ 10:15
    Tony
    0

    Nothing is coming up in the console. This is how the follwing logs look in the backend. Its accross dev and staging, and caching is turned off. Seems to get the correct number of lines, just isnt showing them?

     

     

    Example log:

    2015-06-02 00:48:02,361 [101] INFO  umbraco.BusinessLogic.Log - [Thread 652] Log scrubbed.  Removed all items older than 2015-04-03 00:48:02

    2015-06-02 04:48:02,395 [101] INFO  umbraco.BusinessLogic.Log - [Thread 822] Log scrubbed.  Removed all items older than 2015-04-03 04:48:02

    2015-06-02 08:48:02,471 [101] INFO  umbraco.BusinessLogic.Log - [Thread 1039] Log scrubbed.  Removed all items older than 2015-04-03 08:48:02

    2015-06-02 08:53:27,571 [101] WARN  Umbraco.Web.Mvc.RenderRouteHandler - [Thread 1061] The current Document Type AgentHome matches a locally declared controller of type EvanEvans.UmbracoSite.Controllers.AgentArea.AgentHomeController. Custom Controllers for Umbraco routing must implement 'Umbraco.Web.Mvc.IRenderMvcController' and inherit from 'System.Web.Mvc.ControllerBase'.

    2015-06-02 08:53:54,290 [101] WARN  Umbraco.Web.Mvc.RenderRouteHandler - [Thread 1034] The current Document Type BookingDetails matches a locally declared controller of type EvanEvans.UmbracoSite.Controllers.AgentArea.BookingDetailsController. Custom Controllers for Umbraco routing must implement 'Umbraco.Web.Mvc.IRenderMvcController' and inherit from 'System.Web.Mvc.ControllerBase'.

    2015-06-02 09:05:56,123 [101] INFO  Umbraco.Web.Security.WebSecurity - [Thread 1057] User Id: 0 logged in

    2015-06-02 09:05:56,201 [101] INFO  Umbraco.Core.PluginManager - [Thread 1063] Starting resolution types of Umbraco.Web.Trees.TreeController

    2015-06-02 09:05:56,224 [101] INFO  Umbraco.Core.PluginManager - [Thread 1063] Completed resolution of types of Umbraco.Web.Trees.TreeController, found 8 (took 22ms)

    2015-06-02 09:05:56,293 [101] INFO  Umbraco.Core.PluginManager - [Thread 1061] Starting resolution types of umbraco.interfaces.IApplication

    2015-06-02 09:05:56,310 [101] INFO  Umbraco.Core.PluginManager - [Thread 1061] Completed resolution of types of umbraco.interfaces.IApplication, found 7 (took 16ms)

    2015-06-02 09:05:56,367 [101] INFO  Umbraco.Core.PluginManager - [Thread 1026] Starting resolution types of umbraco.interfaces.ITree

    2015-06-02 09:05:56,395 [101] INFO  Umbraco.Core.PluginManager - [Thread 1026] Completed resolution of types of umbraco.interfaces.ITree, found 41 (took 28ms)

    2015-06-02 09:05:56,397 [101] INFO  Umbraco.Core.PluginManager - [Thread 1062] Starting resolution types of Umbraco.Web.Trees.TreeController

    2015-06-02 09:05:56,398 [101] INFO  Umbraco.Core.PluginManager - [Thread 1062] Completed resolution of types of Umbraco.Web.Trees.TreeController, found 8 (took 0ms)

    2015-06-02 09:05:56,403 [101] INFO  Umbraco.Core.PluginManager - [Thread 1062] Starting resolution types of umbraco.interfaces.ITree

    2015-06-02 09:05:56,432 [101] INFO  Umbraco.Core.PluginManager - [Thread 1062] Completed resolution of types of umbraco.interfaces.ITree, found 20 (took 29ms)

    2015-06-02 09:08:29,233 [101] INFO  Umbraco.Core.PluginManager - [Thread 1062] Starting resolution types of Umbraco.Web.Trees.TreeController

    2015-06-02 09:08:29,233 [101] INFO  Umbraco.Core.PluginManager - [Thread 1062] Completed resolution of types of Umbraco.Web.Trees.TreeController, found 8 (took 0ms)

  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Jun 02, 2015 @ 21:14
    Dan Diplo
    0

    To be honest, I'm at a loss. I pasted your log file into a 7.2.4 site I have and it read it fine (even including the double-spacing shown above). I haven't had anybody else mention this issue before, and, as I say, I've got it running on a number of 7.2.4 sites where it works fine.

    You don't have any extensions running that might be blocking content? (Maybe try it in an incognito Window?).

    Are you able to test with a default install of 7.2.4?

    I also know this is rather ironic, but there's not anything logged in the log files that mention any issue?

     

  • Barry Fogarty 487 posts 1112 karma points
    Jun 24, 2015 @ 16:39
    Barry Fogarty
    0

    NB I also have this issue on Umbraco 7.2.4. I have stepped through the JS and can confirm the data arrays are filled. I think it might be a problem with ng-table. It just seems like the data array is not being parsed out properly into the table rows.

    What I find confusing is in the controller there is an app.requires.push('ngTable');

    But if I look in the sources I see 2 files, ng-table.js (blank) and ng-table.min.js (with code). I have tried copying across the contents of ng-table.min.js, deleting ng-table.js from disk etc, nothing seems to work though.

  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Jun 25, 2015 @ 18:57
    Dan Diplo
    0

    Hi,

    Did you install this via the Umbraco Package or via NuGet?

    Either way, neither of the latest releases has ng-table.js in it. All you should have are:

    ng-table.min.js and ng-table.map

    Perhaps you could try deleting the entire DiploTraceLogViewer folder from App_Plugins and reinstall the latest version?

  • Barry Fogarty 487 posts 1112 karma points
    Jul 01, 2015 @ 10:05
    Barry Fogarty
    0

    Hi Dan,

    Just thought I would let you know I deleted all the existing resources and reinstalled from nuget. Still have the same issue though - it gets the data array OK and outputs a blank row but does not render the actual text - as per the original screenshot.

    Its not a critical issue as there are other ways to read the log - just thought I would follow up.

  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Jul 01, 2015 @ 18:07
    Dan Diplo
    0

    Thanks for trying, Barry. But I'm at a loss as to why this is happening. If you ever get to the bottom of it, let me know!

  • Simon Dingley 1398 posts 3252 karma points c-trib
    Jan 20, 2016 @ 11:59
    Simon Dingley
    0

    I have this issue on 7.2.8 with 2.2.3. If I browse to...

    /Umbraco/Backoffice/TraceLogViewer/TraceLog/GetLogData?logfileName=UmbracoTraceLog.txt
    

    I just get back an empty array

    []
    

    There is data in the log file and the permissions are ok so I copied the log entries to my local environment and got the same problem. The log file contained entries like this:

    2016-01-20 11:11:28,402 [10] WARN  
    Server: NOT AVAILABLE 
    Url: http://NOT AVAILABLENOT AVAILABLE
     Umbraco.Core.Services.ApplicationTreeService - [P12108/T19/D2] The tree definition: <add initialize="true" sortOrder="0" alias="censusTree" application="developer" title="Census" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Census.Controllers.CensusTreeController, Census" /> could not be resolved to a .Net object type
    

    Looking at the source - the issue seemed to be because the lines don't match the regex. I stepped through the source locally and found this was true and here is an example of an unmatched log entry line:

    2016-01-20 11:11:28,402 [10] WARN  
    

    This entry as per the above example from my log file does not return a match for the current regex. I have forked the project to see if I can resolve this when I have time but regex is not my strong point.

  • Simon Dingley 1398 posts 3252 karma points c-trib
    Jan 20, 2016 @ 14:10
  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Jan 21, 2016 @ 09:36
    Dan Diplo
    1

    Thanks for all the info. I'm working on adding Unit tests to the project to try and ensure the regex works in all circumstances - currently it has to support different formats, as the log format changed in 7.3.x

    It may take a while as it will involve a fair bit of rewriting and I have limited free time, but I'll give it a shot!

  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Feb 05, 2016 @ 08:55
    Dan Diplo
    1

    @Tony By chance I came across a site exhibiting the exact same behaviour you reported. The data was coming back, but was displaying as "blank" rows in the table. This gave me a chance to debug and I've found out the reason:

    Basically, the way it works is that I have an MVC API Controller that returns a c# class as a "model" that represents each log entry - this looks like this:

    public class LogDataItem
    {
        public DateTime Date { get; set; }
        public string Level { get; set; }
        public string Logger { get; set; }
        public string Message { get; set; }
        public string ThreadId { get; set; }
        public string DomainId { get; set; }
        public string ProcessId { get; set; }
    }
    

    As you can see it uses standard C# convention of upper-case for properties.

    So what normally happens is that when this model gets serialised as JSON to be returned to the Angular view that displays the log data, then you access each property as upper case, as below:

    <tr ng-repeat="item in $data" ng-class="{tlError: item.Level == 'ERROR', tlWarn: item.Level == 'WARN'}">
        <td data-title="'Time'" sortable="'Date'" filter="{ 'Date': 'text' }" class="date">
            {{ item.Date | date:'HH:mm:ss' }}
        </td>
        <td data-title="'Level'" sortable="'Level'" filter="{ 'Level': 'level' }" class="level">
            {{ item.Level }}
        </td>
        <td data-title="'Logger'" sortable="'Logger'" filter="{ 'Logger': 'text' }" class="logger">
            {{ item.Logger | limitTo:100 }}
        </td>
        <td data-title="'Message'" sortable="'Message'" filter="{ 'Message': 'text' }" ng-click="openDetail(item)">
            <div class="message">{{ item.Message | limitTo:200 }}</div>
        </td>
    </tr>
    

    But for some reason - as yet unknown to me - in the cases where it doesn't work the C# model is getting serialised with lower-case properties. This means it isn't binding to the Angular properties (since it is case-sensitive). The quick way to fix this is to go to the following file:

    App_Plugins\DiploTraceLogViewer\backoffice\diplotracelog\edit.html
    

    And change al the item. properties to be lower case eg.

    {{ item.Date }} becomes {{ item.date }} etc.

    Clear your cache (maybe touch web.config too) and it should work.

    I've no idea why this is happening in certain installations. It doesn't seem to be related to the Umbraco version or the version of the Log Viewer. The only factor I've found is that the site it didn't work on had Merchello installed. I'm wondering if some 3rd party packages modify something?

    Anyway, I'll see if I can find a fix - but if you manually edit the file above it might work for you. Can you give it a shot and let me know?

  • Barry Fogarty 487 posts 1112 karma points
    Feb 05, 2016 @ 11:14
    Barry Fogarty
    2

    Hi Dan,

    I believe you are right to suspect Merchello, as it uses a JsonCamelCaseFormatter on its webapi methods. I also had Merchello installed on the site I had this issue with the log viewer. See this thread:

    https://our.umbraco.org/projects/collaboration/merchello/merchello/70409-merchello-camelcase-formatter-interfering-with-other-packages

    It seems Rusty was planning to swap out his attribute to one in use in Umbraco's core. I will point him at this thread and hopefully he can offer more info.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Feb 05, 2016 @ 15:32
    Rusty Swayne
    0

    The issue Peter was had to do with the previous version of the attribute - post 1.10.0 it's handled with an ActionFilterAttribute which (as far as I knew) corrected the problem of that we were having with the formatter being assigned globally.

    I have been able to replicate the issue locally now - I'll play around with it this morning.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Feb 05, 2016 @ 20:22
    Rusty Swayne
    2

    OK, the problem was indeed with Merchello's JsonCamelCaseFormatterAttribute.

    Shannon posted a link to his blog which provided the solution to the problem http://shazwazza.com/post/webapi-per-controller-configuration/ - so thanks to him for that =)

    The issues is resolved in the merchello-dev branch on GitHub. I'll post a patch release (1.14.1) sometime next week. There were no JS changes, so just the binaries - specifically Merchello.Bazaar.dll and Merchello.Web.dll.

    enter image description here

  • Dan Diplo 1463 posts 5631 karma points MVP 3x c-trib
    Feb 06, 2016 @ 19:46
    Dan Diplo
    0

    Nice work in finding it so fast, Rusty and for clearing up the mystery! Guess we've both learned some new things :)

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Feb 06, 2016 @ 20:03
    Rusty Swayne
    0

    Thanks Dan - and yes, learn something new every day =)

Please Sign in or register to post replies

Write your reply to:

Draft