0

when i using

logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)

i cant create log file, and when i using

logging.debug('This message should go to the log file')

it will create as many times of line after execute it. like this

This message should go to the log file
This message should go to the log file
This message should go to the log file
This message should go to the log file
This message should go to the log file
This message should go to the log file
2

1 Answer 1

0

try providing the path where the file should be created, may be it will create the log file

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.