Logfire.ai client library
Project description
Logfire - Python Logging Made Easy
Collect logs directly from any Python code, including Django.
Logfire is a hosted service that centralizes all of your logs into one place. Allowing for analysis, correlation and filtering with SQL. Actionable dashboards and collaboration come built-in. Logfire 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 Logfire Python client library using the pip
command:
pip install logfire-python
Make sure you install the logfire-python
package and not a different package with the logfire
keyword in the package name from a different author.
Example project
To help you get started with using Logfire in your Python projects, we have prepared a simple Python program that showcases the usage of Logfire 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 logfire-python
client library as shown before:
pip install logfire-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 logfire.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 Logfire documentation or contact our support.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file logfire_python-0.0.9.tar.gz
.
File metadata
- Download URL: logfire_python-0.0.9.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb53ef88a62de78923c4a8c0a9a4b5b15c239abe533a5d8be40a288093666a0f |
|
MD5 | 82b19cb16fb276e3e86de92f56d73cd3 |
|
BLAKE2b-256 | 944ed6760589cd5542acfd7faa8e4319ed7a0288d7b13ac41f4db54e7f2f0b70 |
File details
Details for the file logfire_python-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: logfire_python-0.0.9-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2261b3f0cabce7d20628213a86068d927a24b45fbd677da931f617854b22d9f3 |
|
MD5 | 1fa7047ce362c1fbdf0657578107e01b |
|
BLAKE2b-256 | ab02331b5e9d17303aa14beded8460195fbf8339b9a5d54eb4090e5b4521fc2d |