Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing the logger from an outside class

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

    Accessing the logger from an outside class

    HI all

    I would like to have access to the NinjaTrader Logger but in an outside class for debugging purposes.

    Until now I don't have found a way to do it ...


    Need help

    #2
    Hi blar,

    We have available Log() method which writes information to the log.


    If you're looking to read from this, the log files are labeled according to the date in:
    My Documents\NinjaTrader\log\log.YYYYMMDD.txt

    Today's would be log.20110321.txt

    These samples can help with reading information from a file:

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Yes I know the Log() and I am using it with a Ninja method.

      The problem is when I try to access this method from a new class I don't have access to it..

      Comment


        #4
        Thank you for the reply. It won't necessarily work outside of the NinjaScript event handlers and methods. It's not recommended to use this for debugging purposes as it can significantly slow down NT startup when there are many lines. It's better to write to a file or use the output window for debugging.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        131 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X