After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322540 - Backend to index Gajim logs
Backend to index Gajim logs
Status: RESOLVED INCOMPLETE
Product: beagle
Classification: Other
Component: General
0.1.x
Other All
: Normal enhancement
: Community
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2005-11-27 00:57 UTC by Sam Morris
Modified: 2010-03-18 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first attempt (11.27 KB, patch)
2005-11-27 00:58 UTC, Sam Morris
none Details | Review
revised patch (9.36 KB, patch)
2005-11-27 13:25 UTC, Sam Morris
rejected Details | Review

Description Sam Morris 2005-11-27 00:57:13 UTC
Here is a first stab at a backend to index the logs of the Gajim instant messenger.
Comment 1 Sam Morris 2005-11-27 00:58:18 UTC
Created attachment 55263 [details] [review]
first attempt
Comment 2 Debajyoti Bera 2005-11-27 03:03:33 UTC
The gaim backend is undergoing some major changes (improvements) in bug# 321087.
This patch is probably based on the Gaim backend. Any improvements to Gaim
backend might be helpful to the Gajim backend (e.g. there will be no separate
gaimcrawler class).
 
Comment 3 Sam Morris 2005-11-27 13:25:25 UTC
Created attachment 55273 [details] [review]
revised patch

I have removed the GajimCrawler class and made a few other cleanups.
Comment 4 Daniel Drake 2005-11-27 17:01:11 UTC
Looks mostly ok, but what is the log filename format? Does it append to one
continuous log per person, or does it start a new log every time a conversation
is opened (like gaim), or what?
Comment 5 Sam Morris 2005-11-27 17:19:22 UTC
It's one continuous log per person, stored at ~/.gajim/logs/(jid). A jid is a
Jabber user id, it looks like an email address: <user@example.com>.

Lines in the log file are in the following format:

(timestamp):(sent|recv):(message)

Timestamp is seconds since the epoch, to two decimal places. The other user's
jid I get from the filename. The user's own jid is not stored in the log file,
so I just used Environment.UserName.
Comment 6 Debajyoti Bera 2005-11-28 03:38:45 UTC
A side comment, maybe the user's own jid is stored in gajim's conf file ? IMO,
using the login name for gajim account name would be wrong information.
Just curious, what if one signs in as two different accounts ? Is it possible to
distinguish the log files, if separate log files are created at all ?
Comment 7 Daniel Drake 2005-11-28 14:15:10 UTC
The problem with logging continuously to one file per-jid is that that file will
get very big over time. Every time someone says something in a conversation, the
whole conversation log will be reindexed, which might span a very long time
period. This is very expensive.

We haven't got the infrastructure in place to handle this effectively just yet.
Ideally we need to seek to the point where last indexing completed and just
index from there.
Comment 8 Sam Morris 2005-11-28 14:28:57 UTC
Good idea about getting the user's jid from the config file. Other information,
such as the user's roster, is only accessible via dbus while Gajim is running.

This might all be moot anyway since it seems <http://trac.gajim.org/ticket/647>
that in the devlopment version of Gajim's, the logging infrastructure has been
rewritten to use sqlite. I'm not sure how to handle this in Beagle, or even if
it's possible to do it in a sensible way. The Gajim backend could add its own 
beagle_last_indexed_log_entry = (jid, timestamp) table to the database...
Comment 9 Debajyoti Bera 2006-01-08 01:05:11 UTC
A link to the discussion in Gajim bugzilla:
http://trac.gajim.org/ticket/647
Comment 10 DoomHammerNG 2006-04-24 00:13:52 UTC
Is there a chance for Gajim filter to be an official part of Beagle?
Comment 11 Debajyoti Bera 2006-04-25 18:51:49 UTC
(In reply to comment #10)
> Is there a chance for Gajim filter to be an official part of Beagle?

If someone writes one, then yes. As per comment#8, gajim has moved to sqlite bases storage which makes the currently attached patch invalid.
Comment 12 Sam Morris 2010-03-18 18:03:11 UTC
This bug is old. I no longer use either gajim or beagle and want it off my bug list. :)