On Friday, 22 March 2019 09:09:16 UTC+5:30, adam....@gmail.com  wrote:
> On Thursday, March 21, 2019 at 10:26:14 PM UTC-5, Sharan Basappa wrote:
> > I am running a program and even though the program runs all fine, the log 
> > file is missing. I have pasted first few lines of the code.
> > 
> I am thinking--hoping, rather--that you just kind of double pasted there. 
> Anyways, you needed to specify the logging level in basicConfig:
> 
> import os
> import csv
> import logging
> import random
> 
> #Create and configure logger
> # Check out level=logging.INFO
> logging.basicConfig(filename="test_1.log", filemode='w', format='%(asctime)s 
> %(message)s', level=logging.INFO)
> log = logging.getLogger()
> log.info("Yay!")

Adam,

I don't understand. The logger is set to DEBUG level using the following line.
logger.setLevel(logging.DEBUG)

Do you see anything incorrect?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to