Disable Logging

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

Moderator: Mr_Noodle

Disable Logging Sat Nov 22, 2008 3:40 am • by desh
Is it possible to completely disable Hazel logging? I understand that there's a verbose mode, though I've never used it. The reason I ask is that I decided to defrag my drive today (using iDefrag) and to my surprise the most fragmented files by far were Hazel.prev.log (1184 fragments) and Hazel.log (744). The next largest fragmented file had 393 fragments.

I don't particularly care about logging unless something is broken, and that usually only occurs when I initially set the Hazel rules up. I'd be happy to turn logging back on if I found something stopped working, I'd just like to stop the constant writing that appears to take place given the rules I'm running. The two log files alone are 500MB in size (covering ~10 days)!

Thanks,
desh
desh
 
Posts: 6
Joined: Sun Sep 16, 2007 3:01 am

Re: Disable Logging Tue Nov 25, 2008 3:31 pm • by Mr_Noodle
Not right now but it's something I may consider via a hidden default setting. I wouldn't worry about the fragmentation. It's not like you are accessing the file much anyways plus it should get rotated out.

What is more concerning is that (a) the log wasn't rotated after a week and (b) why the log file is so big. My log file is less than 100M and that's with debug logging enabled. If you see certain errors being repeated over and over, then it might be worthwhile to address those directly.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Disable Logging Sat Dec 19, 2009 4:37 am • by jocrau
My log file is flooded by messages. (>600MB within a few days). I tried
defaults write com.noodlesoft.Hazel Debug -bool NO
but that didn't change anything. could you please implement a configuration option to disable logging.

Alternatively I can use Hazel to delete the log file every time it grows over 1 MB ;-)

---- snip ---
2009-12-19 09:25:47.397 hazelfolderwatch[4235] de_DE: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.398 hazelfolderwatch[4235] resources: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.399 hazelfolderwatch[4235] design: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.409 hazelfolderwatch[4235] fr_FR: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.410 hazelfolderwatch[4235] resources: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.412 hazelfolderwatch[4235] design: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.421 hazelfolderwatch[4235] ja_JP: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.423 hazelfolderwatch[4235] resources: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.424 hazelfolderwatch[4235] design: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.433 hazelfolderwatch[4235] ko_KR: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.434 hazelfolderwatch[4235] resources: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.436 hazelfolderwatch[4235] design: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.445 hazelfolderwatch[4235] ru_RU: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.446 hazelfolderwatch[4235] resources: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.448 hazelfolderwatch[4235] design: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.457 hazelfolderwatch[4235] zh_CN: Rule Run rules on subfolders matched.
2009-12-19 09:25:47.458 hazelfolderwatch[4235] resources: Rule Run rules on subfolders matched.
----
jocrau
 
Posts: 1
Joined: Sat Dec 19, 2009 4:20 am

Re: Disable Logging Mon Dec 21, 2009 5:07 pm • by Mr_Noodle
Again, I'll think about it but I think it's a bad idea in general. If something goes wrong, there is no way of diagnosing (and many times it's something that can't be replicated easily). Also, is your log file being rotated properly? This happens on a weekly basis so if your log file is older than that (look at the creation date, not the modified) then something else is wrong.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Disable Logging Fri Feb 21, 2014 9:19 pm • by mrmachine
Is this still not possible? My log file is currently 800MB. It is *constantly* writing log lines, constantly re-running and logging the same rules over and over again (generally "Run rules on folder contents").

No errors are being logged for me to fix.

Doesn't hazel use FSevents or something to only run rules when something happens in a folder? Perhaps that doesn't apply when I am running rules on folders mounted in an NFS share?

In that case, how can I prevent Hazel from endlessly and immediately re-polling and logging every nested directory that Hazel is monitoring?

If that's not possible, e.g. I can't reduce the verbosity of the log, then I would like to see an option for Hazel to maintain only a small log in memory (say 1MB of the most recent events) and only log to disk when an option is specifically enabled.

This should still allow users to dump their recent log troubleshooting.
mrmachine
 
Posts: 14
Joined: Thu Sep 05, 2013 10:52 am

Re: Disable Logging Mon Feb 24, 2014 3:59 pm • by Mr_Noodle
If you are using NFS, then yes, you are forcing Hazel to poll. fsevents only really works for local filesystems (though it seems to sometimes work if your local machine is the one making the changes). How often is it polling?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support