License: LGPL
Read more about Mongoose below or download and try Mongoose today:
Download URL: http://sourceforge.net/project/showfiles.php?group_id=77296
Email: opensource@notanothercorporation.com
import mongoose from mongoose.reporters import FileLogReporter mongoose.start() mongoose.registerReporter(FileLogReporter('mongoose.log')) mongoose.setSessionInfo('your_app_version', '1.0') # < ... your code here ... > mongoose.stop()
This program has encountered a problem that means it can not continue. Please contact your technical support provider, system administrator or the vendor of this software and ask them for assistance. Mongoose Incident Identifier: 89662
--------------------------------------------------------------------------- Mon Mar 3 15:50:23 2003 89662 exceptions.Exception Dummy Exception Traceback (most recent call last): File "mongoose/reporters.py", line 491, in ? raise Exception("Dummy Exception") Exception: Dummy Exception info one: Stuff info two: A value ---------------------------------------------------------------------------
From: mongoose@example.com To: developer@example.com Subject: Mongoose Incident Report X-Mongoose-Id: 89662 Date: Mon, 3 Mar 2003 15:50:23 -0800 (PST) (This is an optional message prologue.) --------------------------------------------------------------------------- Mon Mar 3 15:50:23 2003 89662 exceptions.Exception Dummy Exception Traceback (most recent call last): File "mongoose/reporters.py", line 491, in ? raise Exception("Dummy Exception") Exception: Dummy Exception info one: Stuff info two: A value ---------------------------------------------------------------------------
The following is an example MII:
89662
Exciting, huh?
Read more about Mongoose below or download and try Mongoose today:
Download URL: http://sourceforge.net/project/showfiles.php?group_id=77296
Email: opensource@notanothercorporation.com
Mongoose source code uses Epydoc compatible docstrings, feel free to read them. These will be particularly useful if you want to develop your own reporter. (e.g. to page some hapless SysAdmin; record a MII and log to a web site; send a message to a remote system monitor, etc...)
We're not gonna catch a segfault, okay? (That belongs in the realm of a non-Python specific Open Source/Free Software implementation of this functionality.)
runall.py
Executes all the unit tests found in
the 'test' directory. Can be used to do this in your packages too.
test/extunit.py
A special type of unit test class that allows us to unit test
functionality that would otherwise disrupt or be disrupted by the
standard Python unittest
framework. This is how we unit
test our replacement system exception handler (otherwise the unit test
framework would catch all the uncaught exceptions). This can be used
in your own test suites also--it's internally documented, but the
documentation probably needs elaboration.
This is the implementation specific, technical bit, you don't need to know this to use MIIs, and you shouldn't rely on the exact method of generating MIIs in the current implementation either.
At present a MII is generated by extracting function names from the traceback of the uncaught exception and concatenating them into a string, getting a hash for that string and then using the value of the hash modulo 10000.
This method has some pros and cons:
It is possible for an MII to have an extended form but this is not currently implemented. An MII in extended form looks like:
501-89662-72
where the first number is the software release version, the second
number the simple MII and the last number the line number (possibly
modulo 100) of the file where the exception occurred. This form
reduces the likelihood of a MII clash caused by two different
exceptions in one function. If there is sufficient demand for this form
it may be added.
Download and try Mongoose today:
Download URL: http://sourceforge.net/project/showfiles.php?group_id=77296