[jdev] Local history storage

Thijs Alkemade thijs at xnyhps.nl
Wed Dec 19 16:25:16 UTC 2012

Op 19 dec. 2012, om 11:02 heeft Mathieu Pasquet <mathieui at mathieui.net> het volgende geschreven:

> On 19/12/2012 08:14, David E. Ammouial wrote:
>> Hello,
>> I'm currently switching from Gajim to Empathy (trying it out becomes I'm
>> discovering GNOME 3), and as a user I'd like to express a wish to client
>> developers: IMHO, clients should store the chat history at the same place.
>> Gajim, for instance, has taken interesting steps since its beginning.
>> Before, everything was stored under $HOME/.gajim and now there's
>> .local/share/gajim, .config/gajim and .cache/gajim. Such sweetness is a
>> global naming policy change that modern software tend to respect, so
>> that there's more consistency (e.g. all local storage goes to .local).
>> So here, my proposal is to go one step further: I guess .local/share is
>> called "share" because it's supposed to host shared resources, not one
>> subdirectory per program. Chat history is a good example: a
>> .local/share/xmpplogs/ directory would make total sense.
>> Of course, the exact format would need to be thoughtfully defined, but
>> does the goal itself sound reasonable?
>> (I'm well aware of the efforts to store history on server side, but I
>> think local history will still be around for a while.)
>> Regards.
> I’m not sure about having the same location for every clients (conflicts, concurrent access, and all the fun of shared resources), but a common format in order to allow easy migrations (copy + paste of the log files) would indeed be nice. It would also mean that we could have an external, standardized tool to view the logs.
> As it was mentionned, XEP-0136 introduces a standard for querying and retrieving message logs, but in order to create a new XEP to specify the file format of the client logs, we would need to extend its scope. Most clients nowadays store lots of things in their logs (namely, presences) which are not mentionned in the XEP (or did I misread?) ; this is especially true for nick changes in a groupchat.
> Another issue with a standardized file format is that the chosen file format depends of the goal of the client. E.g gajim, if I’m not mistaken, stores its logs in a sqlite database, which allows them to have a nice graphical tool dedicated to query the logs in various ways, and stay efficient. But other clients (like poezio, or mcabber) have opted for a plain text and file-based file format, because it keeps the logs human-readable, and less prone to corruption (and we can still kinda-query it with grep).
> (for reference, you were talking about the freedesktop basedir spec: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html )
> --
> Mathieu Pasquet (mathieui)

Previous Adium developers set up this proposal[1] for an "official chat log spec".
However, I'm not aware of any other client ever showing interest in also supporting it.

It has, in my own opinion, a number of drawbacks (for example, some information is
only stored in the file paths!), but I want to mention it as a good candidate for a starting
point for a common format.

Considering the existing differences in clients and the large amounts of logs already
existing, it might be a too ambitious goal to have all clients use the same format, but
export/import functionality for one common format would already be a good step.

Thijs Alkemade

[1] = http://trac.adium.im/wiki/XMLLogFormat

More information about the JDev mailing list