Metadata-Version: 2.1
Name: inference-logging
Version: 1.0.6
Summary: A package to initialize standardized logging.
License: EUPL-1.2
Author: Dataport Inference Service Team
Author-email: dataportinferenceservice@dataport.de
Requires-Python: >=3.9.2,<4.0.0
Classifier: License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: inference-model (>=2.0.12)
Requires-Dist: pydantic-settings (>=2.0.0)
Description-Content-Type: text/markdown

# Inference Logging

A package to initialize standardized logging for the inference service.

## Getting Started - Usage

Install this package into your repository:
```
pip install inference-logging
```

In your code:

```python
# ----------
# Add the logging-config to your own config.
from inference_logging import config as logging_config
from pydantic import Field
from pydantic_settings import BaseSettings


class CustomConfig(BaseSettings):
    """
    Customize your config.
    """
    appname: str = Field(default="your app name")
    logging: logging_config.Config = Field(default_factory=logging_config.Config)


custom_config: CustomConfig = CustomConfig()

# ----------
# At the beginning of your running script, initialize the logging.
# TODO: Import your initialized config.
from inference_logging import logging

logging.init(custom_config.appname, custom_config.logging)

# ----------
# Whenever you need a new logger, use the custom logger provided by this package.
from inference_logging import logging

logger: logging.Logger = logging.get_logger(__name__)

```

