How do I enable the FogBugz Maintenance Service log file? - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com2013-06-18T22:30:51Zhttp://fogbugz.stackexchange.com/feeds/question/324http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://fogbugz.stackexchange.com/questions/324/how-do-i-enable-the-fogbugz-maintenance-service-log-fileHow do I enable the FogBugz Maintenance Service log file?FogBugz KB2009-10-15T06:52:17Z2012-10-17T14:33:51Z
<p>How can I use log files to diagnose problems with the FogBugz Maintenance Service?</p>
http://fogbugz.stackexchange.com/questions/324/how-do-i-enable-the-fogbugz-maintenance-service-log-file/325#325Answer by FogBugz KB for How do I enable the FogBugz Maintenance Service log file?FogBugz KB2009-10-15T06:53:12Z2012-10-17T14:33:51Z<p>The FogBugz Maintenance Service periodically hits the maintenance URL (sURL in the registry or application.data) to carry out jobs such as search indexing, mail delivery and retrieval, and other <a href="http://fogbugz.stackexchange.com/questions/794/what-does-the-fogbugz-maintenance-service-actually-do" rel="nofollow">important "heartbeat" tasks</a>. If this service is crashing, you'll want to enable logging to diagnose the problem.</p>
<p>On <strong>Linux</strong>, the maintenance service log is always enabled and is called <strong>hb.log</strong>. It can be found in <code>[path_to_fogbugz]/logs</code> (usually <code>/opt/fogbugz/logs</code>).</p>
<p>On <strong>Windows</strong>, the maintenance service log is called <strong>fogbugzmaint.txt</strong>. It should be created in the temp directory of the user running FogBugz (e.g., <code>C:\Users\FogBugz\AppData\Local\Temp</code>). When you start the Maintenance Service, it will log to the Windows Event Viewer to let you know where to find fogbugzmaint.txt:</p>
<p><img src="http://our.fogbugz.com/default.asp?pg=pgDownload&pgType=pgWikiAttachment&ixAttachment=206666&sFileName=log.png" alt="alt text"></p>
<p>Follow these steps to enable maintenance service and licensing logging.</p>
<ol>
<li>
Edit the registry using <strong>REGEDIT</strong>. Navigate to:<br /><br />
<strong>HKEY_LOCAL_MACHINE\<br />
SOFTWARE\<br />
Fog Creek Software\<br />
FogBugz</strong>
<br /><br />
</li>
<li>In the righthand pane, right click and choose <strong>New > DWORD Value</strong><br /><br /></li>
<li>Create a value named Logging and set it to <strong>10</strong> (that's hexadecimal). This turns on the most verbose logging (see log levels below).<br /><br /></li>
<strong>LOG_INFO = 10<br />
LOG_WARNING = 5<br />
LOG_ERROR = 1</strong><br /><br />
<li>Using your web browser, go to your FogBugz site and try to log on (to trigger license validation). For FogBugz Maintenance problems, make sure there is mail sitting patiently on your mail server, and give the Maintenance Service enough time to check for the mail (the "Check for new mail" interval setting on the Mailboxes page).<br /><br /></li>
<li>Run the Windows Event Viewer and look in the Application Log. Look for a message from FogBugz, which will tell you the location where the FogUtil log file was written (probably something like <strong>fogutil.txt</strong> in your Windows directory). A message from FogBugz Maintenance Service will tell you where the <strong>fogbugzmaint.txt</strong> log file lives.<br /><br /></li>
<li>For technical support, send the appropriate log file to us. <br /><br /></li>
<li>In the registry, turn off logging by setting the <strong>Logging</strong> key to 0.<br /><br /></li>
</ol>
<p>Note: If you use an email client to view the messages sitting on your mail server, it must be a POP3 client, not an IMAP client.</p>