import logging
c = 5
print(c)
#logging.basicConfig(leve=logging.info, format= "%(asctime)s - %(levelname)s - %(message)s", datefmt = '%Y-%m-%d %H-M%-%S',filename = "basic", filemode = "w")
#.info(f"there`s {c} c`s")
def main():
logging.basicConfig(
leve=logging.info,
format="%(asctime)s - %(levelname)s - %(message)s",
datefmt='%Y-%m-%d %H:%M:%S',
filename="basis",
filemode="w"
)
logging.info(f"there`s {c} in the thing")
#π nothing showing up in the log file
15 messages Β· Page 1 of 1 (latest)
@true delta
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
not calling main
ye i changed but it still didnt work
define "it doesnt work"
.info is a function btw
.INFO is the numerical constant
show the entire code as it looks now
NVM
sorry guys
i made a silly mistake
instead of typing level=logging.INFO i typed leve=logging.info
sorry for wasting ur time
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.