Skip to main content

Logtail.com client library

Project description

Logtail - Python Logging Made Easy

Logtail python client

ISC License PyPI version Logtail python client

Collect logs directly from any Python code, including Django.

Logtail is a hosted service that centralizes all of your logs into one place. Allowing for analysis, correlation and filtering with SQL. Actionable Grafana dashboards and collaboration come built-in. Logtail works with any language or platform and any data source.

Features

  • Simple integration. Integrates with the Python logging library.
  • Support for structured logging and events.
  • Automatically captures useful context.
  • Performant, light weight, with a thoughtful design.

Supported language versions

  • Python 3.6.5 or newer
  • pip 20.0.2 or newer

Installation

Install the Logtail Python client library using the pip command:

pip install logtail-python

Make sure you install the logtail-python package and not a different package with the logtail keyword in the package name from a different author.


Example project

To help you get started with using Logtail in your Python projects, we have prepared a simple Python program that showcases the usage of Logtail logger.

Download and install the example project

You can download the example project from GitHub directly or you can clone it to a select directory. Then install the logtail-python client library as shown before:

pip install logtail-python

Run the example project

To run the example application, simply run the following command:

python main.py <source-token>

Don't forget to replace <source-token> with your actual source token which you can find by going to logtail.com -> sources -> edit.

If you have trouble running the command above, check your Python installation and try running it with the python3 command instead. It should give you the following output:

Output:
All done! You can check your logs now.

This example project will create a total of 6 logs. Each corresponding to its respective method.

Explore how example project works

Learn how to setup Python logging by exploring the workings of the example project in detail.


Get in touch

Have any questions? Please explore the Logtail documentation or contact our support.

Project details


Download files

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

Source Distribution

logtail-python-0.1.4.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

logtail_python-0.1.4-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file logtail-python-0.1.4.tar.gz.

File metadata

  • Download URL: logtail-python-0.1.4.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for logtail-python-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e127efa6b1a42290df5eb3609429b6a32c2eb78863d45b57f34dc3f8da7b49a5
MD5 8182bbc25358315e64b8c53758bdf368
BLAKE2b-256 14bd712c9c926ca04d55e2c3f0546bbc187c8f49fb7766a9239064b56f03bcba

See more details on using hashes here.

File details

Details for the file logtail_python-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for logtail_python-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 aa29f1139d972ad314d71334ed952e6803c1e2b867c2aaa17b6a1a6553536b71
MD5 4b47df924f9853b2fca81fd10079cb7a
BLAKE2b-256 2c183c5e9c73cfd23fbff15e5a84cdf1794721edd41d93c4e455467b5d300633

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page