Re: Modify log message right before display

Eion Robb <[email protected]> Fri, 24 May 2019 13:05:16 +1200
Newsgroups gmane.comp.gnome.gaim.devel
Message-ID <CAFt0mkoDJ5V-5JipPDs=wzjFTykmBvW3T6JYznduJpvVx+xVpQ@mail.gmail.com>
--===============8311660708618919452==
Content-Type: multipart/alternative; boundary="0000000000003995f6058997cbc3"

--0000000000003995f6058997cbc3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Vince,

Are you making a new PurpleLogLogger object
https://developer.pidgin.im/doxygen/2.7.11/html/struct__PurpleLogLogger.htm=
l
for the encrypted logs, or trying to hook into signals in the PurpleLog for
writing?

If you're making your own PurpleLogLogger, then decrypting would be done in
the 'read' function.  If you're trying to hook into the existing log
system, then you'll probably need to override the PurpleLogLogger->read
function for the html/txt/old loggers as there isn't a signal fired for
'before log read' or anything like that

Cheers,
Eion


On Fri, 24 May 2019 at 11:28, Vincent Lucarelli <[email protected]=
m>
wrote:

> Curious if there is a way to modify a message before it is displayed in
> the log viewer.  I=E2=80=99m prototyping a plugin and want to store encry=
pted logs
> on disk.  When the user chooses to view the log, the plan is to decrypt o=
n
> demand.
>
> I found the log-displaying signal, but it doesn=E2=80=99t appear that the=
 messages
> buried in the PurpleLog argument can be modified.  I considered building =
a
> custom log viewer, but that seems redundant.
>
> Any suggestion would be greatly appreciated.
>
> Thanks,
>
> Vince
> _______________________________________________
> Devel mailing list
> [email protected]
> https://pidgin.im/cgi-bin/mailman/listinfo/devel

--0000000000003995f6058997cbc3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Hi Vince,<div><br></div><div>Are you maki=
ng a new PurpleLogLogger object <a href=3D"https://developer.pidgin.im/doxy=
gen/2.7.11/html/struct__PurpleLogLogger.html">https://developer.pidgin.im/d=
oxygen/2.7.11/html/struct__PurpleLogLogger.html</a> for the encrypted logs,=
 or trying to hook into signals in the PurpleLog for writing?</div><div><br=
></div><div>If you&#39;re making your own PurpleLogLogger, then decrypting =
would be done in the &#39;read&#39; function.=C2=A0 If you&#39;re trying to=
 hook into the existing log system, then you&#39;ll probably need to overri=
de the PurpleLogLogger-&gt;read function for the html/txt/old loggers as th=
ere isn&#39;t a signal fired for &#39;before log read&#39; or anything like=
 that</div><div><br></div><div>Cheers,</div><div>Eion</div><div><br></div><=
/div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a=
ttr">On Fri, 24 May 2019 at 11:28, Vincent Lucarelli &lt;<a href=3D"mailto:=
[email protected]">[email protected]</a>&gt; wrote:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left:1px solid rgb(204,204,204);padding-left:1ex">Curious if there is=
 a way to modify a message before it is displayed in the log viewer.=C2=A0 =
I=E2=80=99m prototyping a plugin and want to store encrypted logs on disk.=
=C2=A0 When the user chooses to view the log, the plan is to decrypt on dem=
and.<br>
<br>
I found the log-displaying signal, but it doesn=E2=80=99t appear that the m=
essages buried in the PurpleLog argument can be modified.=C2=A0 I considere=
d building a custom log viewer, but that seems redundant.<br>
<br>
Any suggestion would be greatly appreciated.<br>
<br>
Thanks,<br>
<br>
Vince<br>
_______________________________________________<br>
Devel mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a><br=
>
<a href=3D"https://pidgin.im/cgi-bin/mailman/listinfo/devel" rel=3D"norefer=
rer" target=3D"_blank">https://pidgin.im/cgi-bin/mailman/listinfo/devel</a>=
</blockquote></div>

--0000000000003995f6058997cbc3--


--===============8311660708618919452==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KRGV2ZWwgbWFp
bGluZyBsaXN0CkRldmVsQHBpZGdpbi5pbQpodHRwczovL3BpZGdpbi5pbS9jZ2ktYmluL21haWxt
YW4vbGlzdGluZm8vZGV2ZWw=

--===============8311660708618919452==--