| 99 | self.init() |
| 100 | |
| 101 | def _log(self, level, plugintype, pluginname, messages): |
| 102 | log = getattr(self.pyload.log, level) |
| 103 | msg = u" | ".join(decode(a).strip() for a in messages if a) |
| 104 | |
| 105 | #: Hide any user/password |
| 106 | try: |
| 107 | msg = msg.replace( |
| 108 | self.account.user, self.account.user[:3] + "*******") |
| 109 | except Exception: |
| 110 | pass |
| 111 | |
| 112 | try: |
| 113 | msg = msg.replace( |
| 114 | self.account.info['login']['password'], "**********") |
| 115 | except Exception: |
| 116 | pass |
| 117 | |
| 118 | log("%(plugintype)s %(pluginname)s[%(id)s]: %(msg)s" % |
| 119 | {'plugintype': plugintype.upper(), |
| 120 | 'pluginname': pluginname, |
| 121 | 'id': self.pyfile.id, |
| 122 | 'msg': msg}) |
| 123 | |
| 124 | def init_base(self): |
| 125 | pass |