mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-02 07:42:40 +00:00
Remove logging setting from global context (#2720)
This commit fixes a bug where changing logging level would be overriden
by `src/crewai/project/crew_base.py`. For example, the following snippet
on top of a crew or flow would not work:
```python
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger(__name__)
```
Crews and flows should be able to set their own log level, without being
overriden by CrewAI library code.
This commit is contained in:
@@ -8,8 +8,6 @@ from dotenv import load_dotenv
|
|||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
logging.basicConfig(level=logging.WARNING)
|
|
||||||
|
|
||||||
T = TypeVar("T", bound=type)
|
T = TypeVar("T", bound=type)
|
||||||
|
|
||||||
"""Base decorator for creating crew classes with configuration and function management."""
|
"""Base decorator for creating crew classes with configuration and function management."""
|
||||||
|
|||||||
Reference in New Issue
Block a user