From 35579e0ccee1405074a7924c41ff1482d02c21a1 Mon Sep 17 00:00:00 2001 From: muhammad-fiaz Date: Sat, 16 Dec 2023 21:23:46 +0530 Subject: [PATCH] fixed setuptools --- README.md | 22 +++++++++--------- setup.py | 1 + tests/log.txt | 56 ++++++++++++++++++++++++++++++++++++++++++++++ tests/path/log.txt | 8 +++++++ 4 files changed, 75 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2e6b509..09b9bdf 100644 --- a/README.md +++ b/README.md @@ -128,18 +128,16 @@ for message in logly.logged_messages: You can use any of the following color codes for custom coloring: -| Color Code | Color | -| ---------- | ------ | -| BLACK | Black | -| RED | Red | -| GREEN | Green | -| YELLOW | Yellow | -| BLUE | Blue | -| MAGENTA | Magenta| -| CYAN | Cyan | -| WHITE | White | - -For example, you can use `color=logly.COLOR.BLACK` or `color="BLACK"` for the black color. +| NAME | Color Code | +|----------| --------------- | +| CYAN | CYAN | +| YELLOW | YELLOW | +| RED | RED | +| BLUE | BLUE | +| BRIGHT RED | CRITICAL | +|WHITE | WHITE | + +For example, you can use `color=logly.COLOR.BLACK` for the black color. ## Contributing Contributions are welcome! Before contributing, please read our [Contributing Guidelines](CONTRIBUTING.md) to ensure a smooth and collaborative development process. diff --git a/setup.py b/setup.py index c542a58..0eb10e5 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ 'setuptools==69.0.2', 'pytest==7.4.3', 'packaging==23.2', + 'colorama==0.4.6', ], setup_requires=['pytest-runner'], tests_require=['pytest'], diff --git a/tests/log.txt b/tests/log.txt index aba90a8..2dd6912 100644 --- a/tests/log.txt +++ b/tests/log.txt @@ -12,3 +12,59 @@ [2023-12-16 21:07:28] INFO: DefaultKey1: DefaultValue1 [2023-12-16 21:07:28] WARNING: DefaultKey2: DefaultValue2 [2023-12-16 21:07:28] INFO: Accessing color directly: DirectColorValue +[2023-12-16 21:16:19] INFO: blackKey1: Value1 +[2023-12-16 21:16:19] WARNING: Key2: Value2 +[2023-12-16 21:16:19] ERROR: Key3: Value3 +[2023-12-16 21:16:19] DEBUG: Key4: Value4 +[2023-12-16 21:16:19] CRITICAL: Key5: Value5 +[2023-12-16 21:16:19] FATAL: Key6: Value6 +[2023-12-16 21:16:19] TRACE: Key7: Value7 +[2023-12-16 21:16:19] LOG: Key8: Value8 +[2023-12-16 21:16:19] INFO: AnotherKey1: AnotherValue1 +[2023-12-16 21:16:19] WARNING: AnotherKey2: AnotherValue2 +[2023-12-16 21:16:19] ERROR: AnotherKey3: AnotherValue3 +[2023-12-16 21:16:19] INFO: DefaultKey1: DefaultValue1 +[2023-12-16 21:16:19] WARNING: DefaultKey2: DefaultValue2 +[2023-12-16 21:16:19] INFO: Accessing color directly: DirectColorValue +[2023-12-16 21:17:08] INFO: greenKey1: Value1 +[2023-12-16 21:17:08] WARNING: Key2: Value2 +[2023-12-16 21:17:08] ERROR: Key3: Value3 +[2023-12-16 21:17:08] DEBUG: Key4: Value4 +[2023-12-16 21:17:08] CRITICAL: Key5: Value5 +[2023-12-16 21:17:08] FATAL: Key6: Value6 +[2023-12-16 21:17:08] TRACE: Key7: Value7 +[2023-12-16 21:17:08] LOG: Key8: Value8 +[2023-12-16 21:17:08] INFO: AnotherKey1: AnotherValue1 +[2023-12-16 21:17:08] WARNING: AnotherKey2: AnotherValue2 +[2023-12-16 21:17:08] ERROR: AnotherKey3: AnotherValue3 +[2023-12-16 21:17:08] INFO: DefaultKey1: DefaultValue1 +[2023-12-16 21:17:08] WARNING: DefaultKey2: DefaultValue2 +[2023-12-16 21:17:08] INFO: Accessing color directly: DirectColorValue +[2023-12-16 21:17:20] INFO: Key1: Value1 +[2023-12-16 21:17:20] WARNING: Key2: Value2 +[2023-12-16 21:17:20] ERROR: Key3: Value3 +[2023-12-16 21:17:20] DEBUG: Key4: Value4 +[2023-12-16 21:17:20] CRITICAL: Key5: Value5 +[2023-12-16 21:17:20] FATAL: Key6: Value6 +[2023-12-16 21:17:20] TRACE: Key7: Value7 +[2023-12-16 21:17:20] LOG: Key8: Value8 +[2023-12-16 21:17:20] INFO: AnotherKey1: AnotherValue1 +[2023-12-16 21:17:20] WARNING: AnotherKey2: AnotherValue2 +[2023-12-16 21:17:20] ERROR: AnotherKey3: AnotherValue3 +[2023-12-16 21:17:20] INFO: DefaultKey1: DefaultValue1 +[2023-12-16 21:17:20] WARNING: DefaultKey2: DefaultValue2 +[2023-12-16 21:17:20] INFO: Accessing color directly: DirectColorValue +[2023-12-16 21:17:30] INFO: blackKey1: Value1 +[2023-12-16 21:17:30] WARNING: Key2: Value2 +[2023-12-16 21:17:30] ERROR: Key3: Value3 +[2023-12-16 21:17:30] DEBUG: Key4: Value4 +[2023-12-16 21:17:30] CRITICAL: Key5: Value5 +[2023-12-16 21:17:30] FATAL: Key6: Value6 +[2023-12-16 21:17:30] TRACE: Key7: Value7 +[2023-12-16 21:17:30] LOG: Key8: Value8 +[2023-12-16 21:17:30] INFO: AnotherKey1: AnotherValue1 +[2023-12-16 21:17:30] WARNING: AnotherKey2: AnotherValue2 +[2023-12-16 21:17:30] ERROR: AnotherKey3: AnotherValue3 +[2023-12-16 21:17:30] INFO: DefaultKey1: DefaultValue1 +[2023-12-16 21:17:30] WARNING: DefaultKey2: DefaultValue2 +[2023-12-16 21:17:30] INFO: Accessing color directly: DirectColorValue diff --git a/tests/path/log.txt b/tests/path/log.txt index 229bc77..488218c 100644 --- a/tests/path/log.txt +++ b/tests/path/log.txt @@ -1,2 +1,10 @@ [2023-12-16 21:07:28] INFO: CustomKey1: CustomValue1 [2023-12-16 21:07:28] WARNING: CustomKey2: CustomValue2 +[2023-12-16 21:16:19] INFO: CustomKey1: CustomValue1 +[2023-12-16 21:16:19] WARNING: CustomKey2: CustomValue2 +[2023-12-16 21:17:08] INFO: CustomKey1: CustomValue1 +[2023-12-16 21:17:08] WARNING: CustomKey2: CustomValue2 +[2023-12-16 21:17:20] INFO: CustomKey1: CustomValue1 +[2023-12-16 21:17:20] WARNING: CustomKey2: CustomValue2 +[2023-12-16 21:17:30] INFO: CustomKey1: CustomValue1 +[2023-12-16 21:17:30] WARNING: CustomKey2: CustomValue2