Metadata-Version: 2.4
Name: k3log
Version: 0.1.9
Summary: A collection of log utilities for Python logging
Author-email: Zhang Yanpo <drdr.xp@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/pykit3/k3log
Project-URL: Documentation, https://k3log.readthedocs.io
Keywords: logging,log,handler,formatter,utilities
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: k3confloader
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: k3proc; extra == "dev"
Provides-Extra: publish
Requires-Dist: build; extra == "publish"
Requires-Dist: twine; extra == "publish"
Requires-Dist: pk3; extra == "publish"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5; extra == "docs"
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
Dynamic: license-file

# k3log

[![Action-CI](https://github.com/pykit3/k3log/actions/workflows/python-package.yml/badge.svg)](https://github.com/pykit3/k3log/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/k3log/badge/?version=stable)](https://k3log.readthedocs.io/en/stable/?badge=stable)
[![Package](https://img.shields.io/pypi/pyversions/k3log)](https://pypi.org/project/k3log)

k3log is a collection of log utilities.

k3log is a component of [pykit3] project: a python3 toolkit set.




# Install

```
pip install k3log
```

# Synopsis

```python
import k3log

# make a file logger in one line
logger = k3log.make_logger("/tmp", level="INFO", fmt="%(message)s", datefmt="%H:%M:%S")
logger.info("foo")

logger.stack_str(fmt="{fn}:{ln} in {func}\n  {statement}", sep="\n")
# runpy.py:174 in _run_module_as_main
#   "__main__", fname, loader, pkg_name)
# runpy.py:72 in _run_code
#   exec code in run_globals
# ...
# test_logutil.py:82 in test_deprecate
#   k3log.deprecate()
#   'foo', fmt='{fn}:{ln} in {func}\n  {statement}', sep='\n')
```

#   Author

Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>

#   Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) <drdr.xp@gmail.com>


[pykit3]: https://github.com/pykit3
