Open nitishgupta opened 7 years ago
Resolved: 1) names of logfiles now follow this order: ClassName_Date_Time.log 2) Added relevant log messages
I feel that classes that have a main should only define a Logger object (i.e. a new log file). Currently other classes do so. For example, if the user runs JWPLParser class, there will be three log files for a single run (PageLineParser, CategoryParser, CategoryPagesParser) but no log file called JWPLParser (the original class run by the user).
Therefore, for classes that define main should start a new log file. All other classes (whose objects) are made in other class functions should use the logger from the 'parent' class. For example, PageLineParser, CategoryParser, and CategoryPagesParser classes should use the logger object defined in JWPLParser.
The runner class is used to start the wikiextractparser. However, the wikiextractparser class passes a logger into the threadpoolexecutor class. Do you think that's fine or should I just instantiate the logger object in the runner class?
Can you put links to the classes in your comments. It is hard to understand this way. For example, there is no 'runner' class.
It calls the ExtractWiki function from the WikiExtractParser class.
The logger object is defined in this class and passed into the threadpoolexecutor class in this line.
Why don't you just make a main function in the WikiExtractParser class and get rid of the Runner class. Is there any specific reason that I might be missing?
I had a main function in the WikiExtractParser initially but you said to remove that and create a Runner class to call the WikiExtractParser. I just wanted to clarify before making the changes.
Okay. Sorry for the confusion. For now let's get rid of the Runner class and make a main function in the WikiExtractParser class. This should solve your doubt about the Logger, right?
Yeah, no problem. I will make the changes.
In the logs folder, all log filenames start with ExtractedWiki.... It is probably because you are using the WikiExtract class (or something for logging). This shouldn't happen.
All log files only contain the following text: Nov 06, 2017 12:34:42 PM edu.illinois.cs.cogcomp.wikiparser.wikiparse.WikiExtractParser
INFO: Static Function
So there is no apparent logging happening. your code should have log messages to keep a track of what is happening.
Ideally, the log files should be names ClassName_Date_Time.log