I am writing a package that has a __main__.py
with something like:
def main():
logging.basicConfig(level=logging.INFO)
print(logging.getLogger(__name__))
if __name__ == "__main__":
main()
And I am running it like so:
python3 -m my_package
And seeing:
<Logger __main__ (ERROR)>
instead of INFO
. And so none of my log messages are showing up on the screen.
Why is basicConfig
not having effect?