For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Does backtrader suppress logging emitted to stdout by the Python logger internally to Cerebro?

  • I have coded up a strategy that should be utilizing the parent (__main__) logger's level (logging.DEBUG), but I cannot get calls to to write to stdout. I'm not new to Python logging, and I've proven to myself that if I instantiate an instance of my strategy, the logging is visible in stdout.

    Is this by design? What was the motivation for bypassing the logging library in this fashion? The examples utilize print internal to the Strategy class implementation, but I think many of us can agree that using print in production is simply a bad idea.

  • administrators

    backtrader doesn't even import the logging module.

    You may have proven whatever you think you have proven, but without showing with which code you have proven the unprovable ...

    Just let us know what have you proven and more importantly how ... you are the one with requirements for production (shall I recall that the platform has costed you nothing?)