On Friday, 22 March 2019 09:09:14 UTC+5:30, DL Neil wrote:
> 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
There is no log file at all in the directory where I am running.
I expected the log file to be in the directory where I am running the test from.
Let me describe it in more detail.
This is the directory - "D:\Users\sharanb\OneDrive - HCL Technologies
Ltd\Projects\MyBackup\Projects\Initiatives\machine
learning\programs\assertion\CNN"
The test program imports the design and runs some test on it.
Both the design file and test file are in the above directory.
--
https://mail.python.org/mailman/listinfo/python-list