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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        169 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        326 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        251 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        353 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        180 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X