crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

crewai changes `logging` settings

Open X3NOOO opened this issue 10 months ago • 4 comments

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

X3NOOO avatar Apr 08 '24 01:04 X3NOOO

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

joaomdmoura avatar Apr 08 '24 01:04 joaomdmoura

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

Kurdzik avatar Jul 09 '24 08:07 Kurdzik

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.

github-actions[bot] avatar Aug 18 '24 12:08 github-actions[bot]

not stale/afaik still not fixed

X3NOOO avatar Aug 21 '24 01:08 X3NOOO