apv

- 🐍 advanced python logging 📔
git clone git://git.acid.vegas/apv.git
Log | Files | Refs | Archive | README | LICENSE

commit f2d0832a010d7a6bdb9347ee51b5e5b449c23501
parent 1f928c4a2fa6ec4d39cc09c8bcefa1d4e7f469e9
Author: acidvegas <acid.vegas@acid.vegas>
Date: Tue, 26 Nov 2024 18:34:48 -0500

Prepair for release 1.0.0

Diffstat:
M.gitignore | 40+++++++++++++++++++++++++++++++++++++++-
ALICENSE | 15+++++++++++++++
MREADME.md | 95+++++++++++++++++++++++--------------------------------------------------------
Aapv/__init__.py | 4++++
Rapv.py -> apv/apv.py | 0
Runittest.py -> unit_test.py | 0

6 files changed, 86 insertions(+), 68 deletions(-)

diff --git a/.gitignore b/.gitignore
@@ -1,2 +1,39 @@
+# Python
 __pycache__/
-logs/
+*.py[cod]
+*$py.class
+*.so
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# Virtual Environment
+venv/
+ENV/
+env/
+
+# IDE
+.idea/
+.vscode/
+*.swp
+*.swo
+
+# OS
+.DS_Store
+Thumbs.db 
+
+# Logs
+logs/
+\ No newline at end of file
diff --git a/LICENSE b/LICENSE
@@ -0,0 +1,15 @@
+ISC License
+
+Copyright (c) 2025, acidvegas <acid.vegas@acid.vegas>
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/README.md b/README.md
@@ -6,8 +6,8 @@
 ## Table of Contents
 - [Introduction](#introduction)
 - [Requirements](#requirements)
-- [Features](#features)
 - [Installation](#installation)
+- [Features](#features)
 - [Configuration Options](#configuration-options)
 - [Usage](#usage)
     - [Basic Console Logging](#basic-console-logging)
@@ -17,19 +17,36 @@
     - [Graylog Integration](#graylog-integration)
     - [AWS CloudWatch Integration](#aws-cloudwatch-integration)
     - [Mixing it all together](#mixing-it-all-together)
-- [Testing](#testing)
 
 ## Introduction
 APV emerged from a simple observation: despite the abundance of logging solutions, there's a glaring lack of standardization in application logging. As a developer deeply entrenched in Elasticsearch, AWS, and Graylog ecosystems, I found myself repeatedly grappling with inconsistent log formats and cumbersome integrations. APV is my response to this challenge – a logging library that doesn't aim to revolutionize the field, but rather to streamline it.
 
-This project is rooted in pragmatism. It offers a clean, efficient approach to generating logs that are both human-readable and machine-parseable. APV isn't about reinventing logging; it's about refining it. It provides a unified interface that plays well with various logging backends, from local files to cloud services, without sacrificing flexibility or performance.
+## Requirements
+- Python 3.10+
 
-While there's no shortage of logging libraries out there, APV represents a distillation of best practices I've encountered and challenges I've overcome. It's designed for developers who appreciate clean, consistent logs and seamless integration with modern logging infrastructures. If you're tired of wrestling with logging inconsistencies in production environments, APV might just be the solution you didn't know you were looking for.
+## Installation
 
-## Requirements
-- [Python 3.10+](https://www.python.org/)
-    - [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html) *(Optional: for CloudWatch logging)*
-    - [ecs-logging](https://github.com/aws-observability/aws-ecs-logging) *(Optional: for ECS logging)*
+### From PyPI
+```bash
+# Basic installation
+pip install apv
+
+# With CloudWatch support
+pip install apv[cloudwatch]
+
+# With ECS logging support
+pip install apv[ecs]
+
+# With all optional dependencies
+pip install "apv[cloudwatch,ecs]"
+```
+
+### From Source
+```bash
+git clone https://github.com/acidvegas/apv
+cd apv
+pip install .
+```
 
 ## Features
 - **Console Logging with Colors**: Enhanced readability with colored log messages in the console.
@@ -42,55 +59,6 @@ While there's no shortage of logging libraries out there, APV represents a disti
 - **AWS CloudWatch Integration**: Send logs to [AWS CloudWatch Logs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html).
 - **Customizable Logging Levels**: Set the logging level to control verbosity.
 
-## Installation
-To install APV, you can use the provided `setup.py` script:
-
-1. **Clone the repository or download the source code.**
-
-   ```bash
-   git clone https://github.com/acidvegas/apv.git
-   ```
-
-2. **Navigate to the project directory.**
-
-   ```bash
-   cd apv
-   ```
-
-3. **Install the package using `setup.py`.**
-
-   ```bash
-   python setup.py install
-   ```
-
-   - **With CloudWatch support:**
-
-     If you plan to use AWS CloudWatch logging, install with the `cloudwatch` extra:
-
-     ```bash
-     pip install .[cloudwatch]
-     ```
-
-   - **Alternatively, install `boto3` separately:**
-
-     ```bash
-     pip install boto3
-     ```
-
-   - **With ECS support:**
-
-     If you plan to use ECS logging, install with the `ecs` extra:
-
-     ```bash
-     pip install .[ecs]
-     ```
-
-     - **Alternatively, install `ecs-logging` separately:**
-
-       ```bash
-       pip install ecs-logging
-       ```
-
 ## Configuration Options
 
 The `setup_logging` function accepts the following keyword arguments to customize logging behavior:
@@ -219,7 +187,7 @@ logging.info('This message will be sent to AWS CloudWatch.')
 import logging
 import apv
 
-# Set up logging to AWS CloudWatch Logs
+# Set up ECS logging
 apv.setup_logging(
     level='INFO',
     ecs_log=True
@@ -251,12 +219,6 @@ apv.setup_logging(
 )
 ```
 
-## Testing
-
-To run the test suite, use the following command:
-
-```bash
-python unittest.py
-```
+---
 
-The test suite will run all the tests and provide output for each test.
-\ No newline at end of file
+###### Mirrors: [acid.vegas](https://git.acid.vegas/apv) • [SuperNETs](https://git.supernets.org/acidvegas/apv) • [GitHub](https://github.com/acidvegas/apv) • [GitLab](https://gitlab.com/acidvegas/apv) • [Codeberg](https://codeberg.org/acidvegas/apv)
diff --git a/apv/__init__.py b/apv/__init__.py
@@ -0,0 +1,4 @@
+from .apv import * 
+
+__version__ = '1.0.0'
+__author__ = 'acidvegas' 
diff --git a/apv.py b/apv/apv.py
diff --git a/unittest.py b/unit_test.py