Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird log files #20

Open
nitishgupta opened this issue Nov 9, 2017 · 10 comments
Open

Weird log files #20

nitishgupta opened this issue Nov 9, 2017 · 10 comments

Comments

@nitishgupta
Copy link
Owner

  1. 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.

  2. 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.

  3. Ideally, the log files should be names ClassName_Date_Time.log

@rxtan2
Copy link
Collaborator

rxtan2 commented Nov 13, 2017

Resolved: 1) names of logfiles now follow this order: ClassName_Date_Time.log
2) Added relevant log messages

@nitishgupta
Copy link
Owner Author

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.

@rxtan2
Copy link
Collaborator

rxtan2 commented Nov 14, 2017

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?

@nitishgupta
Copy link
Owner Author

Can you put links to the classes in your comments. It is hard to understand this way. For example, there is no 'runner' class.

@rxtan2
Copy link
Collaborator

rxtan2 commented Nov 14, 2017

It calls the ExtractWiki function from the WikiExtractParser class.

parser.execute(new FileParser(infilepath, outfilepath, logger.log));

The logger object is defined in this class and passed into the threadpoolexecutor class in this line.

@nitishgupta
Copy link
Owner Author

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?

@rxtan2
Copy link
Collaborator

rxtan2 commented Nov 14, 2017

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.

@nitishgupta
Copy link
Owner Author

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?

@rxtan2
Copy link
Collaborator

rxtan2 commented Nov 14, 2017

Yeah, no problem. I will make the changes.

@rxtan2
Copy link
Collaborator

rxtan2 commented Jan 10, 2018

Resolved:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants