Metadata-Version: 2.4
Name: smoothlogging
Version: 1.0.0
Summary: Easy and consistent logging to file with console output
Home-page: https://github.com/blasebast/smoothlogging
Author: Sebastian Blasiak
Author-email: Sebastian Blasiak <sebastian.blasiak@gmail.com>
License: GNU General Public License v3 (GPLv3)
Project-URL: Homepage, https://github.com/blasebast/smoothlogging
Project-URL: Repository, https://github.com/blasebast/smoothlogging.git
Project-URL: Issues, https://github.com/blasebast/smoothlogging/issues
Keywords: logging,smoothlogging,file-logging,console-logging
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Logging
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov>=2.10; extra == "dev"
Requires-Dist: black>=21.0; extra == "dev"
Requires-Dist: flake8>=3.9; extra == "dev"
Requires-Dist: mypy>=0.900; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

===============================
SmoothLogging
===============================

.. image:: https://img.shields.io/pypi/v/smoothlogging.svg
        :target: https://pypi.python.org/pypi/smoothlogging

Effortless logging to both file and console with automatic timestamped filenames.

Features
--------

* Simple API for configurable logging to file and console
* Automatic timestamped log files (``myapp_20240326143022.log``)
* Consistent log formatting across your application
* Full Python 3.7+ support
* Type hints for better IDE support
* Proper error handling and validation

Installation
------------

.. code-block:: bash

    pip install smoothlogging

Quick Start
-----------

**Using the convenience function:**

.. code-block:: python

    from smoothlogging import get_logger

    logger = get_logger("/var/log/myapp", "myapp")
    logger.info("Application started")
    logger.warning("Something unexpected happened")
    logger.error("An error occurred")

**Using the SmoothLogging class:**

.. code-block:: python

    from smoothlogging import SmoothLogging
    import logging

    smooth = SmoothLogging()
    logger = smooth.get_logger("/var/log/myapp", "myapp", level=logging.DEBUG)

    # Log to file and console (default)
    logger.info("Message with file and console output")

    # Create another logger without console output
    file_only = smooth.get_logger("/var/log/myapp", "file-only", console=False)

API Reference
-------------

**get_logger(log_dir, name, level=logging.DEBUG, console=True)**

    Convenience function to create and configure a logger.

    - ``log_dir``: Directory for log files (created if doesn't exist)
    - ``name``: Logger and log file prefix name
    - ``level``: Logging level (default: DEBUG)
    - ``console``: Enable console output (default: True)
    - Returns: Configured logger instance

**SmoothLogging.get_logger(...)**

    Class method with same parameters as convenience function.

**SmoothLogging.get_existing_logger(name)**

    Retrieve a previously created logger by name.
    - Returns: Logger instance or None if not found

# CI/CD Fixed
