Metadata-Version: 2.4
Name: plainlog
Version: 0.7.0
Summary: Logging made simple and easy.
Keywords: 
Author: Wolfgang Langner
Author-email: Wolfgang Langner <tds333@mailbox.org>
License-Expression: BSD-3-Clause
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: System :: Logging
Requires-Python: >=3.10
Project-URL: Documentation, https://github.com/tds333/plainlog#readme
Project-URL: Issues, https://github.com/tds333/plainlog/issues
Project-URL: Source, https://github.com/tds333/plainlog
Description-Content-Type: text/markdown

# Plainlog

[![PyPI - Version](https://img.shields.io/pypi/v/plainlog.svg)](https://pypi.org/project/plainlog)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/plainlog.svg)](https://pypi.org/project/plainlog)
[![Documentation](https://img.shields.io/badge/docs-github--pages-blue)](https://tds333.github.io/plainlog/)

-----

## Installation

```console
pip install plainlog
```

or add it to your project with

```console
uv add plainlog
uv sync
```

## Quickstart

```python
from plainlog import logger

logger.info("hello world")
logger.warning("look out!")
logger.error("something broke")
```

Or use a profile for more structured output:

```python
from plainlog import logger
from plainlog.configure import apply_log_profile

apply_log_profile("develop", level="DEBUG")
logger.info("ready to go")
```

## Child Loggers

Create a child logger whose name is derived from the current module:

```python
from plainlog import logger

log = logger.new(__name__)
log.info("logged with the module name as logger name")
```

## Processors

Log output is built from a pipeline of processors — a formatter followed by a
handler:

```python
import sys
from plainlog import logger
from plainlog.processors import JsonFormatter, Stream

logger.configure(processors=[JsonFormatter(), Stream(sys.stdout)])
logger.info("hello world", user="alice")
```

See the [Processors](https://tds333.github.io/plainlog/processors/) docs for
the full list of built-in formatters, handlers, and filters (including
redaction, level filtering, and buffering).

## Idea

Main goal is to be a plain easy to use logging library.
Simple, small, and fast.

If you are too lazy for long configuration settings simply use the provided log profiles.
Advanced configuration can be done with environment variables or in the code.

No dependencies to other libraries. Pure Python working in different Python implementations.


## Status

In development beta, internal interfaces can change.

## Changelog

See [CHANGELOG.md](docs/changelog.md) for the full list of changes, or the
[Changelog](https://tds333.github.io/plainlog/changelog/) page in the docs.

## License

`plainlog` is distributed under the terms of the
[BSD 3-Clause License](https://spdx.org/licenses/BSD-3-Clause.html).
