crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
19k stars 2.62k forks source link

crewai changes `logging` settings #441

Open X3NOOO opened 5 months ago

X3NOOO commented 5 months ago

after importing crewai changing the logging config becomes impossible, is this an intended behaviour?

example:

import crewai
import logging

logger = logging.getLogger(__name__)

def main():
    logging.basicConfig(
        level=logging.DEBUG,
        format="%(asctime)s | %(name)s | %(levelname)s | %(message)s",
    )

    logger.debug("foobar")

if __name__ == "__main__":
    main()

expected output: <date> | __main__ | DEBUG | foobar real output: nothing

even after manually changing the level of the logger used with the .setLevel method the output still doesn't match the expected formatting and looks like this: <date> - <numbers> - <filename>-test:<file_line> - DEBUG: foobar

joaomdmoura commented 5 months ago

cc @GabeKoga I think this might be related to some of the changes you did last week? Could you do some checking on it?

Kurdzik commented 2 months ago

Hi, is there any update on this, for version 0.36.0 my logger is still being overwritten

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

X3NOOO commented 2 weeks ago

not stale/afaik still not fixed