Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    maxon::Loggers::PythonConsole

    Cinema 4D SDK
    c++ windows r20 sdk
    3
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pim
      last edited by

      If I understand the manual correctly, the python logger is defined as maxon::Loggers::PythonConsole.

      Built-In Loggers
      All existing loggers are registered at maxon::Loggers. These three loggers can be obtained from these published objects:
      
      maxon::Loggers::Default: The default logger.
      maxon::Loggers::PythonConsole: The Python logger.
      maxon::Loggers::ProcessConsole: The IDE console logger.
      

      So I guess I just have to change below the Default logger to the Python logger, to get all messages.
      However, the namespace does not have a Python logger?

      //const maxon::LoggerRef defaultLogger = maxon::Loggers::Default();
      const maxon::LoggerRef pythonLogger = maxon::Loggers::PythonConsole();
      

      -Pim

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by mp5gosu

        maxon::Loggers::Get(Id("net.maxon.logger.python"))
        

        should get you the python logger.

        1 Reply Last reply Reply Quote 1
        • a_blockA
          a_block
          last edited by a_block

          Hi Pim,

          indeed our LoggerInterface manual is already outdated in this regard. Sorry, for the inconvenience, will be fixed in the next release of the documentation.

          You need to access the logger for the Python Console via it's ID. It's defined in the python.framework in cpython.h: ID_LOGGER_PYTHON (equal to "net.maxon.logger.python").

          Edit: Sorry, I didn't see the answer from @mp5gosu before posting. It's correct.

          So long,
          Andreas

          1 Reply Last reply Reply Quote 0
          • P
            pim
            last edited by

            Great, thank you.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post