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 669471 - User docs should cover how to log/debug filter actions?
User docs should cover how to log/debug filter actions?
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: User Documentation
3.6.x (obsolete)
Other Linux
: Normal minor
: ---
Assigned To: evolution-user-docs
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2012-02-06 12:32 UTC by André Klapper
Modified: 2014-01-02 23:36 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6



Description André Klapper 2012-02-06 12:32:54 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.
Comment 1 André Klapper 2012-02-06 12:34:03 UTC
I filed this because of bug 601526, for example.
Comment 2 Matthew Barnes 2012-02-06 14:45:41 UTC
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.
Comment 3 André Klapper 2012-03-07 15:45:25 UTC
Not documenting this for 3.4 as it would change again => 3.6 stuff
Comment 4 André Klapper 2012-06-09 09:34:49 UTC
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
Comment 5 André Klapper 2012-07-09 18:14:53 UTC
Covered by http://git.gnome.org/browse/evolution/commit/?id=07767d7991444df1cf1c2cfed6692edf3282b924

Leaving this open as I need to verify if this really works.
Comment 6 André Klapper 2013-03-14 13:02:43 UTC
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.
Comment 7 Matthew Barnes 2013-03-14 14:58:29 UTC
(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.
Comment 8 André Klapper 2013-03-14 15:45:27 UTC
CAMEL_DEBUG=:filter evolution >& ~/my-filter-log
does not log anything filter related either, just the usual generic spew.
Comment 9 Matthew Barnes 2013-03-14 16:43:13 UTC
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.
Comment 10 André Klapper 2013-04-19 20:36:27 UTC
(In reply to comment #9)
> Okay, I'll try and figure out what's going on.

Matt: Any luck so far?
Comment 11 Matthew Barnes 2013-06-24 11:29:24 UTC
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
Comment 13 Brian J. Murrell 2014-01-02 21:46:09 UTC
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).
Comment 14 Brian J. Murrell 2014-01-02 23:36:53 UTC
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.