Python Forum
what is this doc page for
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is this doc page for
#8
Logging, metrics, and monitoring are also potential uses of decorators.

Logging, for example if the function throws an exception.
Metrics, such as the amount of time the calls take.
Monitoring / instrumentation generally speaking, e.g. a decorator that sends an email (rather than just log to a file) when a crucial function throws an exception, runs too slowly, or even returns unusual values.
Reply


Messages In This Thread
what is this doc page for - by Skaperen - May-14-2017, 05:49 AM
RE: what is this doc page for - by Larz60+ - May-14-2017, 12:23 PM
RE: what is this doc page for - by Ofnuts - May-14-2017, 03:11 PM
RE: what is this doc page for - by Skaperen - May-15-2017, 03:15 AM
RE: what is this doc page for - by Larz60+ - May-15-2017, 05:03 AM
RE: what is this doc page for - by micseydel - May-15-2017, 05:02 PM
RE: what is this doc page for - by nilamo - May-15-2017, 05:49 PM
RE: what is this doc page for - by micseydel - May-15-2017, 05:56 PM
RE: what is this doc page for - by snippsat - May-15-2017, 06:15 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020