Hazel log: error/warning messages unrelated to Hazel

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

Moderator: Mr_Noodle

When using the Hazel.log during debugging of rules, I keep seeing messages that do not seem to relate to the working of Hazel itself.

E.g. I recently installed the PyEnv package. Since then, the log file is littered with messages like these

Code: Select all
mkdir: /.pyenv/shims: Permission denied
mkdir: /.pyenv/versions: Permission denied


even though I use no Python scripts with Hazel.

There are also other repeating strange messages like
Code: Select all
2018-09-16 13:24:14.521 hazelworker[9733] DEBUG: Found 'brok' file.


Another frequent message is
Code: Select all
"2018-09-16 16:03:25.318 hazelworker[82783] DEBUG: Error reading file /Users/guy/Library/Application Support/Firefox/prefs.js: Error Domain=NSCocoaErrorDomain Code=260 "The file “prefs.js” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/guy/Library/Application Support/Firefox/prefs.js, NSUnderlyingError=0x7fd119d00f00 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2018-09-16 16:03:25.323 hazelworker[82783] DEBUG: Unexpected type for Mail download URL: (null)


Do those messages point to actual problems? If not, how can they be prevented from polluting the log file?

Thanks,

Guy
WorkflowsGuy
 
Posts: 30
Joined: Thu Jul 04, 2013 3:55 pm

I don't think the mkdir messages come from Hazel. Do you have the full log line showing that a Hazel process is producing those?

The other two you can ignore. If you do have a problem, then those messages may come in handy but if there is no observable problem then I wouldn't worry about them.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:I don't think the mkdir messages come from Hazel. Do you have the full log line showing that a Hazel process is producing those?


Here are several lines of the log file. Maybe you can see from them why the messages appear?

Code: Select all
2018-09-19 18:03:01.303 hazelworker[37304] DEBUG: Unexpected type for Mail download URL: (null)
2018-09-19 18:03:01.313 hazelworker[37304] Processing folder Podcasts
2018-09-19 18:03:01.313 hazelworker[37304] DEBUG: Pausing to wait for things to settle down.
2018-09-19 18:03:02.658 hazelworker[96017] DEBUG: Unexpected type for Mail download URL: (null)
2018-09-19 18:03:02.659 hazelworker[96017] DEBUG: About to process directory /Volumes/Public/bearbeiten/Dateien/ermitteln Dateityp
2018-09-19 18:03:02.818 hazelworker[96017] DEBUG: == script output ==
mkdir: /.pyenv/shims: Permission denied
mkdir: /.pyenv/versions: Permission denied

== End script output ==
2018-09-19 18:03:03.035 HazelHelper[550] DEBUG: Thread 0x7fec81d06cd0: Received events (
        {
        date = "2018-09-19 16:03:03 +0000";
        path = "/Volumes/Public/bearbeiten/Dateien/ermitteln Dateityp";
        shouldDoFullScan = 1;
    }
) for stream at path: /Volumes/Public/bearbeiten/Dateien/ermitteln Dateityp
2018-09-19 18:03:03.035 HazelHelper[550] DEBUG: Thread 0x7fec81d06cd0: Run worker for folder: /Volumes/Public/bearbeiten/Dateien/ermitteln Dateityp
2018-09-19 18:03:03.035 HazelHelper[550] DEBUG: Task already running for folder: /Volumes/Public/bearbeiten/Dateien/ermitteln Dateityp
2018-09-19 18:03:03.038 hazelworker[96017] DEBUG: == script output ==
mkdir: /.pyenv/shims: Permission denied
mkdir: /.pyenv/versions: Permission denied

== End script output ==
2018-09-19 18:03:03.280 hazelworker[96017] DEBUG: == script output ==
mkdir: /.pyenv/shims: Permission denied
mkdir: /.pyenv/versions: Permission denied

== End script output ==


What is strange is the "mkdir" commands. From what I can tell, the pyenv installation was successful and is working. So why would some process constantly try to create those directories and then write into the Hazel log?
WorkflowsGuy
 
Posts: 30
Joined: Thu Jul 04, 2013 3:55 pm

Those lines are coming from your script. I can't say why but apparently something in your script is causing that.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I conducted some further tests. From what I see in the log file, every Hazel rule that contains "passes Shell script - embedded script" triggers those statements.

As I have written, none of of the scripts use Python or utilities that are coded in Python. So I do not understand what is happening here.
WorkflowsGuy
 
Posts: 30
Joined: Thu Jul 04, 2013 3:55 pm

What do you have set as the shell? Can you post the scripts?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

The shell is always Bash. The Terminal shows the version as
GNU bash, Version 4.4.23(1)-release (x86_64-apple-darwin15.6.0)
, installed through Homebrew.

Of the approx. 20 scripts, here are three as examples:

Code: Select all
caffeinate -i /usr/local/clamXav/bin/clamscan "$1"


Code: Select all
# externe Abhängigkeit: "Siegfried", installierbar mit Homebrew
sf "$1" | grep -E "    warning : $"


Code: Select all
# Pfad zur Logdatei, die die erkannten Dokumente samt Typ protokolliert
logdatei="/Users/guy/.Dokumentbearbeitung/erkannte Dokumente.csv"

echo "\"$(date -u +"%Y-%m-%dT%H:%M:%SZ")\",\"$1\",\"\",\"Buch\",\"\"" >> "$logdatei"


The last script is in a Hazel Action "Run shell script"/"embedded script", so this triggers it also.
WorkflowsGuy
 
Posts: 30
Joined: Thu Jul 04, 2013 3:55 pm

Check your bash startup/initializations files (.profile, .bashrc, etc.). See if it's coming from one of those.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support