Bugs Genie Bug Report Appender

The Bugs Genie Bug Report Appender files bug reports into the BUGS - The Bugs Genie bug tracking system.

Integrating Bugs Genie Bug Report Appender with Bugs Genie

in order to use this appender with the Bugs Genie, two additional PHP files must be added to your installation (these fiels are included with BugReport Appender download). These files create a form handler that the appender uses to file bug reports.

FileDestination
direct_bug_post.phpPlace this in the root directory of Bugs Genie
bug_report_functions.phpPlace this in the include directory of Bugs Genie

Configuring Bugs Genie Bug Report Appender

Bugs Genie Bug Report Appender takes a number of options from the log4j configuration:

OptionRequiredDescription
applicationtrueBugs Genie application.
assignTofalseBugs Genie username to whom to assign new bug reports.
authenticationHostfalseAuthentication host to use if HTTP authentication is required to file bugs into the web based bug tracking system.
authenticationPasswordfalseAuthentication password to use if HTTP authentication is required to file bugs into the web based bug tracking system.
authenticationRealmfalseAuthentication realm to use if HTTP authentication is required to file bugs into the web based bug tracking system.
authenticationUsernamefalseAuthentication username to use if HTTP authentication is required to file bugs into the web based bug tracking system.
bugsPasswordtrueBugs Genie password.
bugsUsernametrueBugs Genie username.
buildtrueBugs Genie build name.
categorytrueBugs Genie category for newly filed bugs.
connectionStaleCheckingEnabledfalseSets the staleCheckingEnabled value to be set on HttpConnections that are created.
editiontrueBugs Genie edition.
hashingMethodfalseIn order to minimize reporting duplicate bugs, bug reports are tracked with semiunique hashes. This setting controls the method by which these hash values are generated. Available hasing methods:
  • Content: This method generates hash codes based on the string content of logging messages. With this method bug reports are considered different if the content of the message is different.
  • Throwable: This method generates hash codes based on stack traces of logged throwables. In this scheme, different stack traces constitute different bug reports. If no throwable is recorded in a logging event, the string content of that event is used for hasing purposes.
  • Location: This method generates hash codes based on the location in the code from which the logging event was recorded. If a throwable is logged, the code locations specified in the stack trace are included as well. This is the default method.
layouttrueA log4j layout.
maxConnectionsPerHostfalseSets the maximum number of connections allowed for a given HostConfiguration. Defaults to 2
maxSizefalseSet the maximum number of logging events the thread bound buffer can hold. Defaults to 200.
maxTotalConnectionsfalseSets the maximum number of connections allowed in the system.
producttrueBugs Genie product.
statustrueBugs Genie status for newly filed bug reports.
reportDuplicatesfalseBy default, appenders don't report duplicate bug reports. Set this to true to change this behavior.
thresholdPriorityfalseBug reports are not filed unless one or more logging events is of the specified (or greater) priority. The default priority is ERROR
thresholdSizefalseFor long running threads, it may not be practical to wait until a thread ends to file a report. For long running threads, the Logging Event buffer will be checked (based on the sleepMilliseconds parameter). If the events in the buffer are of suffient number (specified by this parameter) and have met the threadholdPriority, they will be filed as a bug. The default value for this option is 100.
urltrueBugs Genie url (point this at direct_bug_post.php).

Sample Configuration

log4j.rootLogger=DEBUG, A1, A2
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.threshold=ERROR

log4j.appender.A2=net.codesmarts.log4j.BugsGenieBugReportAppender
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.thresholdPriority=ERROR
log4j.appender.A2.product=Fake Product
log4j.appender.A2.edition=1.0
log4j.appender.A2.build=12
log4j.appender.A2.category=Interface Bugs
log4j.appender.A2.application=Application
log4j.appender.A2.status=Just confirmed
log4j.appender.A2.bugsUsername=username
log4j.appender.A2.bugsPassword=password
log4j.appender.A2.url=http://myhost/bugs/direct_bug_post.php

# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n