cxppython 0.2.12__tar.gz → 0.2.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cxppython-0.2.12 → cxppython-0.2.13}/PKG-INFO +1 -1
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/loggingmachine.py +50 -8
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython.egg-info/PKG-INFO +1 -1
- {cxppython-0.2.12 → cxppython-0.2.13}/setup.py +1 -1
- {cxppython-0.2.12 → cxppython-0.2.13}/LICENSE +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/README.md +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/__init__.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/bittensor/__init__.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/bittensor/synapse.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/core/__init__.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/core/config.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/main.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/__init__.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/__init__.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/console.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/defines.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/format.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/helpers.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/cxplogging/logginsimple.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/database/__init__.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/database/mongo_singleton.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/database/mysql.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/database/mysql_singleton.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/database/redis.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython/utils/easy_imports.py +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython.egg-info/SOURCES.txt +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython.egg-info/dependency_links.txt +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython.egg-info/requires.txt +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/cxppython.egg-info/top_level.txt +0 -0
- {cxppython-0.2.12 → cxppython-0.2.13}/setup.cfg +0 -0
|
@@ -477,7 +477,7 @@ class LoggingMachine(StateMachine, Logger):
|
|
|
477
477
|
"""
|
|
478
478
|
return self.current_state_value == "Trace"
|
|
479
479
|
|
|
480
|
-
def
|
|
480
|
+
def trace_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
481
481
|
"""Wraps trace message with prefix and suffix."""
|
|
482
482
|
msg = _concat_message(msg, prefix, suffix)
|
|
483
483
|
self._logger.trace(
|
|
@@ -487,17 +487,17 @@ class LoggingMachine(StateMachine, Logger):
|
|
|
487
487
|
stacklevel=stacklevel + CUSTOM_LOGGER_METHOD_STACK_LEVEL,
|
|
488
488
|
)
|
|
489
489
|
|
|
490
|
-
def
|
|
490
|
+
def debug_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
491
491
|
"""Wraps debug message with prefix and suffix."""
|
|
492
492
|
msg = _concat_message(msg, prefix, suffix)
|
|
493
493
|
self._logger.debug(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
494
494
|
|
|
495
|
-
def
|
|
495
|
+
def info_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
496
496
|
"""Wraps info message with prefix and suffix."""
|
|
497
497
|
msg = _concat_message(msg, prefix, suffix)
|
|
498
498
|
self._logger.info(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
499
499
|
|
|
500
|
-
def
|
|
500
|
+
def success_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
501
501
|
"""Wraps success message with prefix and suffix."""
|
|
502
502
|
msg = _concat_message(msg, prefix, suffix)
|
|
503
503
|
self._logger.success(
|
|
@@ -507,26 +507,68 @@ class LoggingMachine(StateMachine, Logger):
|
|
|
507
507
|
stacklevel=stacklevel + CUSTOM_LOGGER_METHOD_STACK_LEVEL,
|
|
508
508
|
)
|
|
509
509
|
|
|
510
|
-
def
|
|
510
|
+
def warning_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
511
511
|
"""Wraps warning message with prefix and suffix."""
|
|
512
512
|
msg = _concat_message(msg, prefix, suffix)
|
|
513
513
|
self._logger.warning(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
514
514
|
|
|
515
|
-
def
|
|
515
|
+
def error_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
516
516
|
"""Wraps error message with prefix and suffix."""
|
|
517
517
|
msg = _concat_message(msg, prefix, suffix)
|
|
518
518
|
self._logger.error(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
519
519
|
|
|
520
|
-
def
|
|
520
|
+
def critical_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
521
521
|
"""Wraps critical message with prefix and suffix."""
|
|
522
522
|
msg = _concat_message(msg, prefix, suffix)
|
|
523
523
|
self._logger.critical(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
524
524
|
|
|
525
|
-
def
|
|
525
|
+
def exception_fix(self, msg="", prefix="", suffix="", *args, stacklevel=1, **kwargs):
|
|
526
526
|
"""Wraps exception message with prefix and suffix."""
|
|
527
527
|
msg = _concat_message(msg, prefix, suffix)
|
|
528
528
|
self._logger.exception(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
529
529
|
|
|
530
|
+
def trace(self, msg="", *args, stacklevel=1, **kwargs):
|
|
531
|
+
"""Wraps trace message with prefix and suffix."""
|
|
532
|
+
self._logger.trace(
|
|
533
|
+
msg,
|
|
534
|
+
*args,
|
|
535
|
+
**kwargs,
|
|
536
|
+
stacklevel=stacklevel + CUSTOM_LOGGER_METHOD_STACK_LEVEL,
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
def debug(self, msg="", *args, stacklevel=1, **kwargs):
|
|
540
|
+
"""Wraps debug message with prefix and suffix."""
|
|
541
|
+
self._logger.debug(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
542
|
+
|
|
543
|
+
def info(self, msg="", *args, stacklevel=1, **kwargs):
|
|
544
|
+
"""Wraps info message with prefix and suffix."""
|
|
545
|
+
self._logger.info(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
546
|
+
|
|
547
|
+
def success(self, msg="", *args, stacklevel=1, **kwargs):
|
|
548
|
+
"""Wraps success message with prefix and suffix."""
|
|
549
|
+
self._logger.success(
|
|
550
|
+
msg,
|
|
551
|
+
*args,
|
|
552
|
+
**kwargs,
|
|
553
|
+
stacklevel=stacklevel + CUSTOM_LOGGER_METHOD_STACK_LEVEL,
|
|
554
|
+
)
|
|
555
|
+
|
|
556
|
+
def warning(self, msg="", *args, stacklevel=1, **kwargs):
|
|
557
|
+
"""Wraps warning message with prefix and suffix."""
|
|
558
|
+
self._logger.warning(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
559
|
+
|
|
560
|
+
def error(self, msg="", *args, stacklevel=1, **kwargs):
|
|
561
|
+
"""Wraps error message with prefix and suffix."""
|
|
562
|
+
self._logger.error(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
563
|
+
|
|
564
|
+
def critical(self, msg="", *args, stacklevel=1, **kwargs):
|
|
565
|
+
"""Wraps critical message with prefix and suffix."""
|
|
566
|
+
self._logger.critical(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
567
|
+
|
|
568
|
+
def exception(self, msg="", *args, stacklevel=1, **kwargs):
|
|
569
|
+
"""Wraps exception message with prefix and suffix."""
|
|
570
|
+
self._logger.exception(msg, *args, **kwargs, stacklevel=stacklevel + 1)
|
|
571
|
+
|
|
530
572
|
def on(self):
|
|
531
573
|
"""Enable default state."""
|
|
532
574
|
self._logger.info("Logging enabled.")
|
|
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as f:
|
|
|
4
4
|
long_description = f.read()
|
|
5
5
|
setup(
|
|
6
6
|
name="cxppython", # 包名
|
|
7
|
-
version="0.2.
|
|
7
|
+
version="0.2.13", # 版本号
|
|
8
8
|
packages=find_packages(exclude=["tests", "tests.*"]), # 自动找到所有包
|
|
9
9
|
description="A python utils package",
|
|
10
10
|
long_description=long_description,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|