home · contact · privacy
Log :RAW to file.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 12 Aug 2025 23:48:20 +0000 (01:48 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 12 Aug 2025 23:48:20 +0000 (01:48 +0200)
ircplom/client_tui.py

index c22f00d6218fda82f655f14acca3171403973a2e..bb06b10091c3b5d23c2d05c01e64153e40036027 100644 (file)
@@ -262,6 +262,9 @@ class _ClientKnowingTui(Client):
                 to_log += [f'  {k}: [{getattr(conn_setup, k)}]']
         for item in to_log:
             self._client_tui_trigger('log', scope=scope, msg=item, **kwargs)
+            if scope == LogScope.RAW:
+                with open(f'{self.client_id}.log', 'a', encoding='utf8') as f:
+                    f.write((f'>' if kwargs['out'] else '<') + f' {msg}\n')
 
     def _update_db(self, key: str, value: int | str, confirm: bool) -> None:
         super()._update_db(key, value, confirm)