Saturday 19 May 2012

Prevent the FitBit daemon from filling your system logs

On the Mac the FitBit daemon logs to the system.log but it can be a bit verbose.

The following change to the FitBit launch daemon should send the output to its own file:
--- com.fitbit.fitbitd.plist.orig 2012-05-19 09:24:54.000000000 +0100
+++ com.fitbit.fitbitd.plist      2012-05-19 09:06:51.000000000 +0100
@@ -44,5 +44,9 @@
     <false/>
     <key>Disabled</key>
     <false/>
+    <key>StandardErrorPath</key>
+    <string>/var/log/fitbitd.log</string>
+    <key>StandardOutPath</key>
+    <string>/var/log/fitbitd.log</string>
   </dict>
 </plist>
Don't forget to create the file ahead of time and give it the correct permissions.
$ sudo touch /var/log/fitbitd.log && sudo chown nobody: /var/log/fitbitd.log
Restart fitbitd:
$ cd /Library/LauchDaemons
$ sudo launchctl unload com.fitbit.fitbitd.plist
$ sudo launchctl load com.fitbit.fitbitd.plist