| | 2 | |
|---|
| | 3 | * Release 0.2.4 (28 Jan 2008) |
|---|
| | 4 | |
|---|
| | 5 | ** Compatibility |
|---|
| | 6 | |
|---|
| | 7 | All releases between 0.1.3 and 0.2.4 (inclusive) are fully wire-compatible. |
|---|
| | 8 | |
|---|
| | 9 | ** foolscap.logging Changes |
|---|
| | 10 | |
|---|
| | 11 | *** 'flogtool filter' command added |
|---|
| | 12 | |
|---|
| | 13 | This mode is used to take one event-log file and produce another with a |
|---|
| | 14 | subset of the events. There are several options to control the filtering: |
|---|
| | 15 | "--strip-facility=foolscap" would remove all the foolscap-related messages, |
|---|
| | 16 | and "--after=start --before=end" will retain events that occur within the |
|---|
| | 17 | given period. The syntax is still in flux, expect these options to change in |
|---|
| | 18 | the next few releases. The main idea is to take a very large logfile and turn |
|---|
| | 19 | it into a smaller, more manageable one. |
|---|
| | 20 | |
|---|
| | 21 | *** error logging |
|---|
| | 22 | |
|---|
| | 23 | Applications should avoid recording application-specific instances in log |
|---|
| | 24 | events. Doing so will forces the log viewer to access the original source |
|---|
| | 25 | code. The current release of foolscap uses pickle, so such instances will be |
|---|
| | 26 | loadable if the viewer can import the same code, but future versions will |
|---|
| | 27 | probably switch to using Banana, at which point trying to log such instances |
|---|
| | 28 | will cause an error. |
|---|
| | 29 | |
|---|
| | 30 | In this release, foolscap stringifies the type of an exception/Failure passed |
|---|
| | 31 | in through the failure= kwarg, to avoid inducing this import dependency in |
|---|
| | 32 | serialized Failures. It also uses the CopiedFailure code to improve |
|---|
| | 33 | portability of Failure instances, and CopiedFailures have been made |
|---|
| | 34 | pickleable. |
|---|
| | 35 | |
|---|
| | 36 | The preferred way to log a Failure instance is to pass it like so: |
|---|
| | 37 | |
|---|
| | 38 | def _oops(f): |
|---|
| | 39 | log.msg("Oh no, it failed", failure=f, level=log.BAD) |
|---|
| | 40 | d.addErrback(_oops) |
|---|
| | 41 | |
|---|
| | 42 | Finally, a 'log.err()' method was added, which behaves just like Twisted's |
|---|
| | 43 | normal log.err(): it can be used in a Deferred errback, or inside an |
|---|
| | 44 | exception handler. |
|---|
| | 45 | |
|---|
| | 46 | *** 'flogtool web-viewer' |
|---|
| | 47 | |
|---|
| | 48 | Adding a "sort=time" query argument to the all-events viewing page URL will |
|---|
| | 49 | turn off the default nested view, and instead will sort all events strictly |
|---|
| | 50 | by time of generation (note that unsynchronized clocks may confuse the |
|---|
| | 51 | relative ordering of events on different machines). "sort=number" sorts all |
|---|
| | 52 | events by their event number, which is of dubious utility (since these |
|---|
| | 53 | numbers are only scoped to the Tub). "sort=nested" is the default mode. |
|---|
| | 54 | |
|---|
| | 55 | The web-viewer now provides "summary views", which show just the events that |
|---|
| | 56 | occurred at a given severity level. Each event is a hyperlink to the line in |
|---|
| | 57 | the all-events page (using anchor/fragment tags), which may make them more |
|---|
| | 58 | convenient to bookmark or reference externally. |
|---|
| | 59 | |
|---|