Jump to content
Korean Random

How to enable "DebugUtils.LOG_DEBUG" in WoT CT

Recommended Posts

in WoT, to enable Flash debug output (using "DebugUtils.LOG_DEBUG")

import logging


how to eneble "DebugUtils.LOG_DEBUG" in WoT CT ?

Share this post

Link to post

Short link
Share on other sites

thanks, I tried it, but it did not move.


in WoT, class Flash has following methods,

    def afterCreate(self):
        self.addExternalCallback('debug.LOG_GUI', self.__onLogGui)
        self.addExternalCallback('debug.LOG_GUI_FORMAT', self.__onLogGuiFormat)

but in WoT CT, the method of class FlashComponentWrapper is follows,

   def afterCreate(self):

and not defined in class Flash.

Share this post

Link to post

Short link
Share on other sites

@Chirimen do hook functions, what's the problem?

in class AppEntry also use

from gui.Scaleform.framework.application import AppEntry

_logger = logging.getLogger(__name__)

def onLogGui(logType, msg, *kargs):
    _logger.debug('%s.GUI: %r, %r', str(logType), msg, kargs)

def onLogGuiFormat(logType, msg, *kargs):
    _logger.debug('%s.GUI: %r', str(logType), msg % kargs)

def afterCreate(self, base=AppEntry.afterCreate):
    self.addExternalCallback('debug.LOG_GUI', onLogGui)
    self.addExternalCallback('debug.LOG_GUI_FORMAT', onLogGuiFormat)
AppEntry.afterCreate = afterCreate


Share this post

Link to post

Short link
Share on other sites

thanks @Ekspoint, but unfortunately it did not work.


the hook to afterCreate of AppEntry is success,
but addExternalCallback does not seem to work or it`s maybe removed somewhere.



    DebugUtils.LOG_ERROR("this is ERROR message");
    DebugUtils.LOG_DEBUG("this is DEBUG message");
    DebugUtils.LOG_WARNING("this is WARNING message");


python.log in CT with hook or without hook:

2019-04-21 09:33:19.150: ERROR: this is ERROR message
2019-04-21 09:33:19.150: WARNING: this is WARNING message


python.log in without hook:

2019-04-21 09:54:03.108: DEBUG: [gui.Scaleform.Flash] ERROR.GUI: 'this is ERROR message', ()
2019-04-21 09:54:03.108: DEBUG: [gui.Scaleform.Flash] DEBUG.GUI: 'this is DEBUG message', ()
2019-04-21 09:54:03.108: DEBUG: [gui.Scaleform.Flash] WARNING.GUI: 'this is WARNING message', ()


Share this post

Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...