Bug 36265 - Uses two different data directories.
Summary: Uses two different data directories.
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: logger (show other bugs)
Version: unspecified
Hardware: Other All
: lowest normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard: Storage break
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 09:36 UTC by Will Thompson
Modified: 2019-12-03 19:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2011-04-15 09:36:43 UTC
Today I looked for my Telepathy logs. So I typed `ls ~/.local/sh<tab>/tele<tab>` in my shell, and it was completed to ~/.local/share/telepathy-logger. However, that directory only contains a single file, namely favourite-contacts.txt. The actual logs are stored in ~/.local/share/TpLogger.

(I notice that *neither* directory name is consistent with the cache directory, which is named ~/.cache/telepathy/logger…)

There should not be two differently-named directories for the same component. The ‘TpLogger’ directory name is ugly; so I propose that the ‘telepathy-logger’ name be chosen as the canonical name.

There are roughly two approaches to dealing with existing logs in the TpLogger directory: moving them, or reading them in place.

I think it would be tidiest to move all the logs from ~/.local/share/TpLogger to ~/.local/share/telepathy-logger. This obviously breaks downgrading to an older version of the logger; I'm not sure how big a concern that really is in practice. (It's not a data loss issue.) The logger could also move logs from ~/.local/share/Empathy/logs at the same time.

Alternatively, new logs could be written to the ‘telepathy-logger’ directory, but old logs could continue to be read from the TpLogger directory. Since the logger already supports reading logs from ~/.local/share/Empathy/logs, this should be feasible. OCD power-users like myself could manually consolidate their logs.
Comment 1 Will Thompson 2011-04-15 09:39:40 UTC
(I have even more old logs in ~/.gnome2/Empathy/logs! Amazing. I think these were imported to ~/.local/share/Empathy at the time of the MC5 migration.)
Comment 2 Robert McQueen 2011-04-15 09:40:54 UTC
How long has it been since Empathy wrote to the log directory? If it's >12 months (ie 2 GNOME releases, and likely two major distro releases), I think it's safe to say we can add code to tp-logger to move them now.

For TpLogger -> telepathy-logger I agree, but we could do the migration better by just mv the logs directory and leave a symlink in case we're visited by old tp-logger versions.
Comment 3 Nicolas Dufresne 2011-04-15 11:36:52 UTC
My two cents, the decision to not import stuff was not for downgrades, only to avoid the risk of loosing information. The XML format in Empathy folder is not exactly the same as in the TpLogger folder. Also, each added folder adds a large overhead to reading logs, so we need to be careful using that solution.

As I mention, in today's implementation it MIGHT be possible to just move Empathy folder into TpLogger because we no longer use/set the cm_id. This has never been tested or looked at attentively. Moving TpLogger content into telepathy-logger format is also something that is fairly safe if telepathy-logger is empty, but if for some reason it's not (e.g.somebody pulled a backup or something) things get more complex, since we could need to merge them to be 100% correct.

I didn't touch anything of this with in mind the fact that we eventually want to move forward with a SQLite base storage, which then would be put in the right directory. We need to decide if it's worth the extra effort.
Comment 4 GitLab Migration User 2019-12-03 19:30:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-logger/issues/13.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.