1

I want to implement BugCommitBefore in order to process emails and set some fields from the content of incoming error reports.

Is there a way to do some logging? e.g. I don't even know wheter bugevent.sFrom contains email, name, angle brackets, quotes, etc.

I saw that api.Notifications.AddMessage could be a good way to get some debug output, but that won't work for me because I want to work on incoming mails, not on users who edits a case.

Does the plugin system have a logging facility that goes into some text file? That would be great!

BTW: In my scenario (no hosting, local installation, company internal plugin) I'd love to remove the security sandbox restrictions, then I'd just do my logging by appending lines to a text file. But with the sandbox, I see no way of logging, except by setting up a webservice in my network that receives log files and that is too much work

Fog Creek Case FC1965627

flag

3 Answers

1

Exposing the FogBugz logging facility to plugins is certainly something we could do. Consider it on the list.

link|flag
1

This definitely falls under the workaround category, but another option that might be worth considering is having your plugin implement IPluginDatabase and create its own log table for storing debugging information in.

You could then either view the log data directly in the database, or implement IPluginPageDisplay to display the log in a more accessible fashion.

link|flag
1

I would really appreciate a decent logging facility too. My current workaround is to append log messages to a special wiki page that I created for my plugin, with code something like this in BugCommitBefore:

// Append log message to our plugin's wiki page
CWikiPage wikiPage = api.WikiPage.GetWikiPage(IX_LOG_WIKI_PAGE);
wikiPage.IgnorePermissions = true;
wikiPage.sBody += htmlLogMessage;
wikiPage.Commit();

The downside is that appending stuff to a wiki page is really slow. I'd much rather just write stuff to a text file on the system somewhere. It would be great if there was a way to tell FogBugz to NOT sandbox certain plugins.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.