log file
DL Neil
PythonList at danceswithmice.info
Thu Mar 21 23:38:49 EDT 2019
On 22/03/19 4:25 PM, 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.
>
> Any suggestions where I maybe going wrong?
>
> import os
> import csv
> import logging
> import assertion_design as asd
> import random
>
> #Create and configure logger
> logging.basicConfig(filename="test_1.log", filemode='w', format='%(asctime)s %(message)s')
> import os
> import csv
> import logging
> import assertion_design as asd
> import random
>
> #Create and configure logger
> logging.basicConfig(filename="test_1.log", filemode='w', format='%(asctime)s %(message)s')
>
Do all of these lines actually appear, or is it an accidental
copy-paste+paste?
What do you use to actually record data in the log? eg
logging.info("Informational message")
Any error message from Python?
When you say "the log file is missing" do you mean that there is no such
file, that there is an empty file, or what? Which directory do you run
the code from, and in which directory do you expect to find the log file?
--
Regards =dn
More information about the Python-list
mailing list