#1089 closed enhancement (fixed)
sugar.logger: add trace decorator
Reported by: | sascha_silbe | Owned by: | tomeu |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | Git as of bugdate |
Severity: | Unspecified | Keywords: | r+ |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | New |
Description
The attached patch adds a trace decorator to sugar.logger. It can be used to trace function calls and limits the size of the items it logs. This way e.g. the "preview" attribute (metadata) will be shortened automatically.
It will only trace calls if the new log level TRACE is in effect, which can be done by setting SUGAR_LOGGER_LEVEL to one of the new values 'trace' (lower than 'debug', i.e. 'debug' will be enabled as well) or 'all' (log everything).
Attachments (1)
Change History (4)
Changed 14 years ago by sascha_silbe
comment:1 Changed 14 years ago by sascha_silbe
- Keywords r? added
comment:2 Changed 14 years ago by tomeu
- Keywords r+ added; r? removed
- Resolution set to fixed
- Status changed from new to closed
pushed, thanks!
Note: See
TracTickets for help on using
tickets.
sugar.logger: add decorator trace() and log level 'trace' / TRACE