Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced root logger and hardcoded logging path #150

Open
doomedraven opened this issue Sep 13, 2023 · 1 comment
Open

Forced root logger and hardcoded logging path #150

doomedraven opened this issue Sep 13, 2023 · 1 comment

Comments

@doomedraven
Copy link
Contributor

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:/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

@tbeadle
Copy link

tbeadle commented Sep 13, 2023

See https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library for guidance on setting up logging for a library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants