Exemplo n.º 1
0
    def __init__(self):
        Logger.instances.append(self)

        Grid.__init__(self)

        self.targets = []
        self.targets.append("app")
        # self.targets.append("ui")
        self.resize(len(self.targets) + 1, 2)
        self.setBorderWidth(1)
        self.counter = 0

        self.setHTML(0, 0, "<b>Log</b>")
        self.setText(1, 0, "app")
        for i in range(len(self.targets)):
            target = self.targets[i]
            self.setText(i + 1, 0, target)
Exemplo n.º 2
0
    def __init__(self, target="", message=""):
        if message:
            return Logger().write(target, message)

        # make sure there is only one instance of this class
        if _logger:
            return _logger
        self.setSingleton()

        Grid.__init__(self)

        self.targets = []
        self.targets.append("app")
        # self.targets.append("ui")
        self.resize(len(self.targets) + 1, 2)
        self.setBorderWidth(1)
        self.counter = 0

        self.setHTML(0, 0, "<b>Log</b>")
        self.setText(1, 0, "app")
        for i in range(len(self.targets)):
            target = self.targets[i]
            self.setText(i + 1, 0, target)