Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Request to improve context for error messages.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Request to improve context for error messages.

    Hi

    The log is showing many of these. Usually during startup while it refreshes the charts. But it does not occur all the time so could be multi-thread related also or of course my custom code.

    Would it be possible to enhance all log error messages in the future with some standard context so it can be more easily traced to a particular chart? An example hacked-together context is shown at the bottom:

    Thanks,
    Chris


    2017-02-22 21:22:11:825 ERROR: Failed to call OnRender() for chart object 'Region': ''barsAgo' needed to be between 0 and -1 but was 4590 Parameter name: barIndex'
    2017-02-22 21:22:11:825 ERROR: Failed to call OnRender() for chart object 'Region': ''barsAgo' needed to be between 0 and -1 but was 4590 Parameter name: barIndex'
    2017-02-22 21:22:11:825 ERROR: Failed to call OnRender() for chart object 'Region': ''barsAgo' needed to be between 0 and -1 but was 4590 Parameter name: barIndex'
    2017-02-22 21:22:11:825 ERROR: Failed to call OnRender() for chart object 'Region': ''barsAgo' needed to be between 0 and -1 but was 4590 Parameter name: barIndex'
    2


    protected string DebugContext()
    {
    return String.Format("{0} (OBU): Bip {1} CurBar {2}, BAs {3}, BA0.Type/Type/Period/Count {4} {5} {6} {7}, Ba1.Count {8}",
    InfoMsgBase(),
    BarsInProgress,
    CurrentBar,
    BarsArray.Length,
    BarsArray[0].BarsPeriod.BarsPeriodType,
    BarsArray[0].BarsType,
    BarsArray[0].BarsPeriod,
    BarsArray[0].Count,
    BarsArray.Length > 1 ? BarsArray[1].Count.ToString() : "",
    Times[BarsInProgress][0].ToSortable());
    }

    protected string InfoMsgBase()
    {
    return String.Format("{0} {1} {2} {3} {4}",
    GetType().Name,
    GetHashCode().ToString("X"),
    Instrument != null ? Instrument.FullName : "",
    Bars != null ? Bars.BarsPeriod.BarsPeriodType.ToString() : "",
    Bars != null ? Bars.BarsPeriod.Value : 0);
    }

    #2
    I absolutely second this and have mailed support on separate error message other day.
    I have repeatedly requested this since beta early last year and have see NO improvement on context of messaging - the narrative/response i get is about the multi threaded environment which i do not accept. So ninja over to you again This will only help reduce email and support traffic and developers can more readily resolve issues by tracking to the chart / indicator in question
    thanks

    Comment


      #3
      Hello crokusek and soulfx,


      I have submitted a feature request to the product management team for the following feature :

      These users would like to have every NinjaScript instance and every Window to have a unique tracking ID which shows up in error logs, with a full stack showing all nested NinjaScript objects up to the parent Window. This information should be available through the UI in a right-click menu, on both a window's and indicator or strategy's property screen's. This should be saved with the workspace and visible through the workspace xml.
      I will follow up with more information as soon as it's available. If the feature requests already exists, a vote will be added to it.


      Please let us know if there are any other ways we can help.
      Jessica P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by samir, Today, 07:00 PM
      0 responses
      9 views
      0 likes
      Last Post samir
      by samir
       
      Started by travisloneker, Today, 06:52 PM
      0 responses
      7 views
      0 likes
      Last Post travisloneker  
      Started by InfraredBusa, Today, 05:50 PM
      0 responses
      3 views
      0 likes
      Last Post InfraredBusa  
      Started by White Fork, Today, 04:56 PM
      1 response
      8 views
      0 likes
      Last Post White Fork  
      Started by steveyinyang, Today, 02:48 PM
      3 responses
      22 views
      0 likes
      Last Post steveyinyang  
      Working...
      X