Skip to content

Commit 79fdf20

Browse files
authored
Update README.md
1 parent fff65d6 commit 79fdf20

File tree

1 file changed

+59
-11
lines changed

1 file changed

+59
-11
lines changed

README.md

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,75 @@
1-
🪵 Logtail Integration For Python
1+
# Logtail - Python Logging Made Easy
2+
3+
[![Logtail python client](https://user-images.githubusercontent.com/19272921/154085622-59997d5a-3f91-4bc9-a815-3b8ead16d28d.jpeg)](https://betterstack.com/logtail)
4+
25

36
[![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md)
7+
[![PyPI version](https://badge.fury.io/py/logtail-python.svg)](https://badge.fury.io/py/logtail-python)
48
![Logtail python client](https://github.com/logtail/logtail-python/actions/workflows/main.yml/badge.svg?branch=master)
59

6-
This repository contains the [Logtail](https://logtail.com) Python library, turning your application logs into rich structured events.
10+
Collect logs directly from any Python code, including Django.
711

8-
---
12+
[Logtail](https://logtail.com) 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](https://docs.logtail.com/).
913

1014
### Features
15+
- Simple integration. Integrates with the Python `logging` library.
16+
- Support for structured logging and events.
17+
- Automatically captures useful context.
18+
- Performant, light weight, with a thoughtful design.
19+
20+
### Supported language versions
21+
- Python 3.6.5 or newer
22+
- `pip` 20.0.2 or newer
1123

12-
* Simple integration. Integrates with the Python `logging` library.
13-
* Support for structured logging and events.
14-
* Automatically captures useful context.
15-
* Performant, light weight, with a thoughtful design.
24+
# Installation
25+
Install the Logtail Python client library using the `pip` command:
26+
27+
```bash
28+
pip install logtail-python
29+
```
30+
31+
*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.*
1632

1733
---
1834

19-
### Installation
35+
# Example project
2036

21-
Install the Logtail client library from PyPI as you would with any other package:
37+
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.
2238

23-
```
39+
## Download the example project
40+
41+
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:
42+
43+
```bash
2444
pip install logtail-python
2545
```
2646

27-
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.
47+
## Run the example project
48+
49+
To run the example application, simply run the following command:
50+
51+
```bash
52+
python main.py <source-token>
53+
```
54+
55+
*Don't forget to replace `<source-token>` with your actual source token which you can find by going to logtail.com -> sources -> edit.*
56+
57+
58+
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:
59+
60+
```
61+
Output:
62+
All done! You can check your logs now.
63+
```
64+
65+
This example project will create a total of 6 logs. Each corresponding to its respective method.
66+
67+
## Explore how example project works
68+
69+
Learn how to setup Python logging by exploring the working of the example project in detail.
70+
71+
---
72+
73+
## Get in touch
74+
75+
Have any questions? Please explore the Logtail [documentation](https://docs.logtail.com/) or contact our [support](https://betterstack.com/help).

0 commit comments

Comments
 (0)