Forced root logger and hardcoded logging path
doomedraven opened this issue · comments
Hello, im on latest, 7.1.2
Describe the bug
When user just do import of from pyattck import Attck
it automatically creates a new root logger due to basicConfig
here https://github.com/swimlane/pyattck/blob/master/pyattck/utils/logger.py#L46.
If i create the ./pyattck/data/logging.yml
i can configure that, but would it be possible to move this to mitre = Attck(
as it contains the configuration and initial arguments?
To Reproduce
Steps to reproduce the behavior
- Put
breakpoint()
inside/usr/lib/python3.10/logging/__init__.py(1945)basicConfig()
python3
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyattck import Attck
> /usr/lib/python3.10/logging/__init__.py(1945)basicConfig()
-> """
or
>>> import pyattck
> /usr/lib/python3.10/logging/__init__.py(1945)basicConfig()
-> """
Expected behavior
In some manner similar to mitre = Attck(
be able to configure the logging config path
See https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library for guidance on setting up logging for a library.