Skip to main content

Performance stats logger

Project description


Structured logging support for application performance and monitoring data


""" My Application """

import perflog

def main():
    <All the usual application code goes here>

if __name__ == '__main__':

There are several parameters for the set_and_forget method that can be used to change the default behaviour. For example, by default the performance log messages will be written every 60 seconds.

Note: in addition to writing performance data to the log message itself, perflog also adds extra logrecord fields. This means that if you’re using a log formatter that writes out all the fields in some kind of structured format (say, logstash_formatter), you will find that the performance data will also be recorded in those fields and can therefore be accessed in tools like Kibana.


perflog uses psutil to obtain all the process-related information. Thanks Giampaolo!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for perflog, version 2017.8.7
Filename, size File type Python version Upload date Hashes
Filename, size perflog-2017.8.7-py2.py3-none-any.whl (18.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page