Subversion Repositories freemyipod

Rev

Rev 586 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 586 Rev 600
Line 74... Line 74...
74
        if self.loglevel >= 0:
74
        if self.loglevel >= 0:
75
            if target is None: target = self.target
75
            if target is None: target = self.target
76
            text = (indent * " ") + text
76
            text = (indent * " ") + text
77
            text = text.replace("\n", "\n" + (indent * " "), text.count("\n") - 1)
77
            text = text.replace("\n", "\n" + (indent * " "), text.count("\n") - 1)
78
            if target == "stdout":
78
            if target == "stdout":
79
                sys.stderr.write(text)
79
                sys.stdout.write(text)
80
            if target == "stderr":
80
            if target == "stderr":
81
                sys.stderr.write(text)
81
                sys.stderr.write(text)
82
            elif target == "file":
82
            elif target == "file":
83
                with open(self.logfile, 'a') as f:
83
                with open(self.logfile, 'a') as f:
84
                    f.write(text)
84
                    f.write(text)