Is there a way to look at the raw logs of zeitgeist?

Zeitgeist logs your activity in Unity. Is there a way to look at the raw logs it creates?


Solution 1:

The logs are stored in ~/.local/share/zeitgeist/activity.sqlite. They are stored in an SQLite database, so you will need an SQLite database browser to view them.

Solution 2:

Yes, Zeitgeist stores its data in sqlite. I'm using Ubuntu 12.04 (Precise Pangolin) and my zeitgeist usage data is in

~/.local/share/zeitgeist

In order to access the raw logs, you'll need to know some SQL, which I'll leave up to you. However, if you have not installed sqlite3 Install sqlite3, the command line interface for SQLite Version 3, then do so

sudo apt-get install sqlite3

Then, you may interogate the raw data as follows

[11:33:50 oyrm zeitgeist]$ pwd # Just to show where we are
/home/oyrm/.local/share/zeitgeist
[11:33:54 oyrm zeitgeist]$ sqlite3 -interactive activity.sqlite
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
actor            extensions_conf  mimetype         storage        
event            interpretation   payload          text           
event_view       manifestation    schema_version   uri            
sqlite> 

As you can see, I have access to the activity.sqlite database at this point and may execute SQL to my hearts content. Now, figuring out how these are all related will be a puzzle for you, but you can use sqlite3 to determine useful things like db and table schemas.