GNOME Bugzilla – Bug 669471
User docs should cover how to log/debug filter actions?
Last modified: 2014-01-02 23:36:53 UTC
http://library.gnome.org/users/evolution/3.2/mail-filters-not-working.html does not cover Filter logging. Need to find out first what the gsettings keys are nowadays. From the old FAQ: The relevant gconf keys are: /apps/evolution/mail/filters/log = true /apps/evolution/mail/filters/logfile = "/path/to/logfile" Unfortunately there is currently no GUI feature in Evolution to access this functionality directly. You have to edit the Gconf database, preferably by using one of the specialized configuration editors such as "gconf-editor". Make sure to change "/path/to/logfile" to a real value, it is just an example path. Unfortunately the log is written buffered and only written to the file when, for example, Evolution ends. Monitoring the file with something like tail -f /path/to/logfile will not show any output.
I filed this because of bug 601526, for example.
Haven't tried it, but it looks like "CAMEL_DEBUG=filter" should work. Similarly, there's "CAMEL_DEBUG=junk" for monitoring junk mail classification. I'd kinda rather just get rid of the GConf/GSettings keys.
Not documenting this for 3.4 as it would change again => 3.6 stuff
The new dconf/gsettings from evolution.convert: [org.gnome.evolution.mail] filters-log-actions = /apps/evolution/mail/filters/log filters-log-file = /apps/evolution/mail/filters/logfile
Covered by http://git.gnome.org/browse/evolution/commit/?id=07767d7991444df1cf1c2cfed6692edf3282b924 Leaving this open as I need to verify if this really works.
Logging filter actions as described in https://help.gnome.org/users/evolution/3.6/mail-filters-not-working.html.en does NOT work, even if I manually create the output file before. The instructions are wrong. Matthew: CAMEL_DEBUG=filter evolution >& ~/my-filter-log does not work either - no filter related output whatsoever in that file or on the terminal, though incoming filters WERE definitely applied. Testing with evolution-3.6.4-2.fc18.i686.
(In reply to comment #6) > Matthew: > CAMEL_DEBUG=filter evolution >& ~/my-filter-log > does not work either - no filter related output whatsoever in that file or on > the terminal, though incoming filters WERE definitely applied. Try CAMEL_DEBUG=:filter (with a colon). I can't defend why it's like that, just reading old Camel code here.
CAMEL_DEBUG=:filter evolution >& ~/my-filter-log does not log anything filter related either, just the usual generic spew.
Okay, I'll try and figure out what's going on. It may require code changes... not sure yet. For the record, the colon suggestion came from looking at: https://git.gnome.org/browse/evolution-data-server/tree/camel/camel-filter-driver.c#n1763 But apparently I don't know the correct command-line incantation to activate that.
(In reply to comment #9) > Okay, I'll try and figure out what's going on. Matt: Any luck so far?
Okay, the environment variable is a dead-end. I've now removed it and stated my intentions for how *I* would like filter logging to work in the commit message. I'll let you know when this happens. https://git.gnome.org/browse/evolution-data-server/commit/?id=888204d333ecf286d83493b6876b7820a6128952 For the time being, what's documented in [1] is correct except one thing: the "filters-log-file" needs to avoid syntax a shell would ordinarily expand, like '~' or environment variables like $HOME. The filename in the gsettings key is handed straight to fopen() without any massaging, so the example file should be something like "/home/aklapper/my-filter-log". [1] https://help.gnome.org/users/evolution/3.8/mail-filters-not-working.html.en
Thanks! https://git.gnome.org/browse/evolution/commit/?id=0f90d1f1ce1314673768dde28c6931cd6ff2bbfa
So, following the instructions at: https://help.gnome.org/users/evolution/stable/mail-filters-not-working.html.en I now have: $ gsettings get org.gnome.evolution.mail filters-log-actions true $ gsettings get org.gnome.evolution.mail filters-log-file '/home/brian/tmp/evolution-filter-log' and when I select a message that should trigger filtering actions and then press CTRL-Y I get nothing: $ ls -l /home/brian/tmp/evolution-filter-log -rw-rw-r--. 1 brian brian 0 Jan 2 16:09 /home/brian/tmp/evolution-filter-log Even having waited for a message that should have triggered filtering actions, nothing was written to the log file, and the message was not actioned according to the filter (i.e. to colourize it).
Ahhh. I now I suddenly have something in the log file. Is writing to this file buffered? As a debug log, it really ought not to be.