Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#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)

sugar-base-trace.patch (3.5 KB) - added by sascha_silbe 15 years ago.
sugar.logger: add decorator trace() and log level 'trace' / TRACE

Download all attachments as: .zip

Change History (4)

Changed 15 years ago by sascha_silbe

sugar.logger: add decorator trace() and log level 'trace' / TRACE

comment:1 Changed 15 years ago by sascha_silbe

  • Keywords r? added

comment:2 Changed 15 years ago by tomeu

  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

pushed, thanks!

comment:3 Changed 11 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.