Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# beans_logging

[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bybatkhuu/mod.python-logging/2.build-publish.yml?logo=GitHub)](https://github.com/bybatkhuu/mod.python-logging/actions/workflows/2.build-publish.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/bybatkhuu/mod.python-logging?logo=GitHub)](https://github.com/bybatkhuu/mod.python-logging/releases)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bybatkhuu/module.python-logging/2.build-publish.yml?logo=GitHub)](https://github.com/bybatkhuu/module.python-logging/actions/workflows/2.build-publish.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/bybatkhuu/module.python-logging?logo=GitHub)](https://github.com/bybatkhuu/module.python-logging/releases)
[![PyPI](https://img.shields.io/pypi/v/beans-logging?logo=PyPi)](https://pypi.org/project/beans-logging)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/beans-logging?logo=Python)](https://docs.conda.io/en/latest/miniconda.html)

Expand Down Expand Up @@ -49,12 +49,12 @@ pip install -U beans-logging

```sh
# Install package by git:
pip install git+https://github.com/bybatkhuu/mod.python-logging.git
pip install git+https://github.com/bybatkhuu/module.python-logging.git
```

**C.** Install from **pre-built release** files

1. Download **`.whl`** or **`.tar.gz`** file from **releases** - <https://github.com/bybatkhuu/mod.python-logging/releases>
1. Download **`.whl`** or **`.tar.gz`** file from **releases** - <https://github.com/bybatkhuu/module.python-logging/releases>
2. Install with pip:

```sh
Expand All @@ -68,7 +68,7 @@ pip install ./beans_logging-[VERSION].tar.gz

```sh
# Clone repository by git:
git clone https://github.com/bybatkhuu/mod.python-logging.git beans_logging
git clone https://github.com/bybatkhuu/module.python-logging.git beans_logging
cd ./beans_logging

# Install python build tool:
Expand All @@ -89,7 +89,7 @@ pip install ./dist/beans_logging-${_VERSION}.tar.gz

```sh
# Clone repository by git:
git clone https://github.com/bybatkhuu/mod.python-logging.git beans_logging
git clone https://github.com/bybatkhuu/module.python-logging.git beans_logging
cd ./beans_logging

# Install with editable development mode:
Expand All @@ -100,7 +100,7 @@ pip install -e .

```sh
# Clone repository by git:
git clone https://github.com/bybatkhuu/mod.python-logging.git beans_logging
git clone https://github.com/bybatkhuu/module.python-logging.git beans_logging
cd ./beans_logging

# Install python dependencies:
Expand All @@ -126,7 +126,7 @@ logger.info("Logging info.")

### **Simple**

[**`configs/logger.yml`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/examples/simple/configs/logger.yml):
[**`configs/logger.yml`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/simple/configs/logger.yml):

```yml
logger:
Expand All @@ -139,7 +139,7 @@ logger:
enabled: true
```

[**`main.py`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/examples/simple/main.py):
[**`main.py`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/simple/main.py):

```python
from beans_logging.auto import logger
Expand Down Expand Up @@ -170,7 +170,7 @@ except Exception as err:
logger.exception("Show me, what value is wrong:")
```

Run the [**`examples/simple`**](https://github.com/bybatkhuu/mod.python-logging/tree/main/examples/simple):
Run the [**`examples/simple`**](https://github.com/bybatkhuu/module.python-logging/tree/main/examples/simple):

```sh
cd ./examples/simple
Expand Down Expand Up @@ -212,7 +212,7 @@ ZeroDivisionError: division by zero

### **Advanced (FastAPI)**

[**`configs/logger.yml`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/examples/advanced/configs/logger.yml):
[**`configs/logger.yml`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/advanced/configs/logger.yml):

```yaml
logger:
Expand All @@ -236,14 +236,14 @@ logger:
http_json_err_path: "http.json/{app_name}.json.http.err.log"
```

[**`.env`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/examples/advanced/.env):
[**`.env`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/advanced/.env):

```sh
ENV=development
DEBUG=true
```

[**`logger.py`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/examples/advanced/logger.py):
[**`logger.py`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/advanced/logger.py):

```python
from beans_logging import LoggerLoader, Logger
Expand All @@ -265,7 +265,7 @@ add_file_json_http_handler(
)
```

[**`app.py`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/examples/advanced/app.py):
[**`app.py`**](https://github.com/bybatkhuu/module.python-logging/blob/main/examples/advanced/app.py):

```python
from contextlib import asynccontextmanager
Expand Down Expand Up @@ -306,7 +306,7 @@ def root():
return {"Hello": "World"}
```

Run the [**`examples/advanced`**](https://github.com/bybatkhuu/mod.python-logging/tree/main/examples/advanced):
Run the [**`examples/advanced`**](https://github.com/bybatkhuu/module.python-logging/tree/main/examples/advanced):

```sh
cd ./examples/advanced
Expand Down Expand Up @@ -353,7 +353,7 @@ python -m pytest -sv

## Environment Variables

You can use the following environment variables inside [**`.env.example`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/.env.example) file:
You can use the following environment variables inside [**`.env.example`**](https://github.com/bybatkhuu/module.python-logging/blob/main/.env.example) file:

```sh
ENV=development
Expand All @@ -365,7 +365,7 @@ BEANS_LOGGING_CONFIG_PATH="./configs/logger.yml"

## Configuration

You can use the following configuration template [**`logger.yml`**](https://github.com/bybatkhuu/mod.python-logging/blob/main/templates/configs/logger.yml): file:
You can use the following configuration template [**`logger.yml`**](https://github.com/bybatkhuu/module.python-logging/blob/main/templates/configs/logger.yml): file:

```yaml
logger:
Expand Down Expand Up @@ -405,8 +405,8 @@ logger:

## Documentation

- [docs](https://github.com/bybatkhuu/mod.python-logging/blob/main/docs/README.md)
- [scripts](https://github.com/bybatkhuu/mod.python-logging/blob/main/docs/scripts/README.md)
- [docs](https://github.com/bybatkhuu/module.python-logging/blob/main/docs/README.md)
- [scripts](https://github.com/bybatkhuu/module.python-logging/blob/main/docs/scripts/README.md)

---

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
long_description_content_type="text/markdown",
author="Batkhuu Byambajav",
author_email="batkhuu10@gmail.com",
url="https://github.com/bybatkhuu/mod.python-logging",
download_url=f"https://github.com/bybatkhuu/mod.python-logging/archive/v{_package_version}.tar.gz",
url="https://github.com/bybatkhuu/module.python-logging",
download_url=f"https://github.com/bybatkhuu/module.python-logging/archive/v{_package_version}.tar.gz",
keywords=[
_package_name,
"loguru",
Expand Down