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 andrewtrades, Today, 04:57 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      3 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Started by josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      6 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X