mirror of
https://github.com/kristoferssolo/bunyan-formatter.git
synced 2025-10-21 17:20:35 +00:00
commit
1cfaad6c69
@ -72,13 +72,15 @@ logger.critical("This is a critical message")
|
||||
In your Django project's `settings.py` file, add the following logging configuration:
|
||||
|
||||
```python
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
"formatters": {
|
||||
"bunyan": {
|
||||
"()": BunyanFormatter,
|
||||
"project_name": "cashflow",
|
||||
"project_name": "MyProject",
|
||||
"project_root": BASE_DIR,
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,11 +1,29 @@
|
||||
[project]
|
||||
name = "bunyan-formatter"
|
||||
version = "0.1.1"
|
||||
description = "Bunyan Formatter for Python"
|
||||
description = "A custom formatter for Python's logging module that outputs logs in the Bunyan JSON format."
|
||||
dependencies = []
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
authors = [{ name = "Kristofers Solo", email = "dev@kristofers.xyz" }]
|
||||
license = { file = "LICENSE" }
|
||||
keywords = ["logger", "logging", "bunyan", "formatter"]
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Intended Audience :: Developers",
|
||||
"Topic :: Logging :: Bunyan",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Source = "https://github.com/kristoferssolo/bunyan-formatter"
|
||||
Tracker = "https://github.com/kristoferssolo/bunyan-formatter/issues"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user