|
1 |
| -# Logtail - Python Logging Made Easy |
| 1 | +# [Logtail](https://betterstack.com/logtail) Python client by [Better Stack](https://betterstack.com/) |
2 | 2 |
|
3 | 3 | [](https://betterstack.com/logtail)
|
4 | 4 |
|
5 | 5 |
|
6 | 6 | [](LICENSE.md)
|
7 |
| -[](https://badge.fury.io/py/logtail-python) |
| 7 | +[](https://badge.fury.io/py/logtail-python) |
8 | 8 | 
|
9 | 9 |
|
10 |
| -Collect logs directly from any Python code, including Django. |
| 10 | +Experience SQL-compatible structured log management based on ClickHouse. [Learn more ⇗](https://logtail.com/) |
11 | 11 |
|
12 |
| -[Logtail](https://betterstack.com/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](https://docs.logtail.com/). |
| 12 | +## Documentation |
13 | 13 |
|
14 |
| -### 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. |
| 14 | +[Getting started ⇗](https://betterstack.com/docs/logs/javascript/) |
19 | 15 |
|
20 |
| -### Supported language versions |
21 |
| -- Python 3.6.5 or newer |
22 |
| -- `pip` 20.0.2 or newer |
| 16 | +## Need help? |
| 17 | +Please let us know at [[email protected]](mailto:[email protected]). We're happy to help! |
23 | 18 |
|
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.* |
32 |
| - |
33 |
| ---- |
34 |
| - |
35 |
| -# Example project |
36 |
| - |
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. |
38 |
| - |
39 |
| -## Download and install the example project |
40 |
| - |
41 |
| -You can download the [example project](https://github.com/logtail/logtail-python/tree/master/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 |
44 |
| -pip install logtail-python |
45 |
| -``` |
46 |
| - |
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 workings of the [example project](https://github.com/logtail/logtail-python/tree/master/example-project) in detail. |
70 |
| - |
71 | 19 | ---
|
72 |
| - |
73 |
| -## Get in touch |
74 | 20 |
|
75 |
| -Have any questions? Please explore the Logtail [documentation](https://docs.logtail.com/) or contact our [support](https://betterstack.com/help). |
| 21 | +[ISC license](https://github.com/logtail/logtail-js/blob/master/LICENSE.md), [example project](https://github.com/logtail/logtail-python/tree/master/example-project) |
0 commit comments