Troubleshooting tips (PLEASE READ THIS FIRST BEFORE POSTING)

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I thought I'd post a few troubleshooting tips to help you out. Feel free to add to this thread. I've made it sticky so it's always at the top for easy referencing.

Preview mode

Hazel has a preview mode that will show what files will match which rules. It's "eye" button located to the left the gear/cog menu button. Note that it only previews whether a rule matches. It does not make any predictions on whether the rule executes successfully. So, for instance, if you have a rule matching PDF files and the action is to copy to another drive, the preview would indicate a successful match but will not indicate anything about whether the copy operation would fail or not (like if the drive is currently off-line). Nonetheless, previewing should be quite helpful in working out the logic of your rules.

You can also look at the attributes for each file. Select a file in the preview and click the "i" button. This will show you all the attributes for the file. If a file matches a rule, the fields which were part of the match are highlighted. You can also see the values of any custom attributes that matched at the bottom of the list.

Double-checking rules

Many times, Hazel is doing exactly what you tell it to do but you may have a different interpretation of the rules.

Some things to double-check:
  • Make sure you have the "Any/All/None" pop-up set correctly.
  • Remember that rules are processed in order.
  • Remember that Hazel only applies the first rule that matches (this is different than how rules work in Mail).
The last two points are particularly important. If you create a rule and it doesn't seem to be working, check the rules before it in the list to make sure they aren't matching the file in question.

Checking the logs

Go to the "Info" tab in Hazel and click the "View Log" button. This will show a log of what Hazel has been doing. You can use the search field to look for particular files. Also, you can also bring up the log via the menubar icon.

If you want more in-depth logging, you can enable debug mode as described here: http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=296

Seeing what Hazel (and Spotlight) sees

A good way to see what Hazel (and Spotlight) sees in a file is to use the "mdls" command. You will need to use Terminal so if you are uncomfortable with that then you may want to skip this.
  • Launch Terminal.
  • Type in "mdls " (note that you don't type in the quotes and that there is a space after the command).
  • Drag the file you want to check into the Terminal window and drop it.
  • Press the return key.
  • You should get a print out of all the fields that Spotlight sees for this file.
Last edited by Mr_Noodle on Thu Jan 24, 2008 12:08 pm, edited 1 time in total.
Mr_Noodle
Site Admin
 
Posts: 11577
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

One very important note - if you have Spotlight disabled entirely so that it does not index anything, the subfolder processing will not work. Hazel will not be able to get folder metadata and you will see in the log file something like
Code: Select all
2007-08-16 12:22:58.188 hazelfolderwatch[5444] Caught exception in rule evaluation of file Inbox:
Could not retrieve metadata for file: /Users/gregj/Desktop/Inbox


The solution? Re-enable Spotlight and restart!

(Spotlight can be enabled or disabled simply in the /etc/hostconfig file)
Gregory Grubbs
 
Posts: 1
Joined: Thu Aug 16, 2007 2:44 pm

I am trying to "get" hazel. I thought I 'got' boolean choosing.
I am not getting results I expected.

This sentence needs explanation for me:
Some things to double-check:
Make sure you have the "Any/All" pop-up set correctly.


Is there a recipe guide for starting out?
carto
 
Posts: 7
Joined: Fri Mar 15, 2013 3:43 pm

You might want to post in your own topic in the future since this is more specific to you than to this topic.
Mr_Noodle
Site Admin
 
Posts: 11577
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support