- Notifications
You must be signed in to change notification settings - Fork 7
improve Logger #86
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
improve Logger #86
Conversation
| Are we sure these are all the places where loggers are used? |
| There are two Loggers from another two projects: WALA and SAFE. I am not sure whether you need to change it. |
| Nope, we can keep those. |
| How about these? |
khatchad left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also change these?
edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/safe/InstructionBasedSolver.java: Logger.getGlobal().info("Examining instance: " + instanceKey); edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/safe/InstructionBasedSolver.java: Logger.getGlobal().info("Tracking: " + ret); There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this string a constant, say in the "core" plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, that string may be around somewhere. Please search for it.
khatchad left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about these?
edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/safe/InstructionBasedSolver.java: Logger.getGlobal().info("Examining instance: " + instanceKey); edu.cuny.hunter.streamrefactoring.core/src/edu/cuny/hunter/streamrefactoring/core/safe/InstructionBasedSolver.java: Logger.getGlobal().info("Tracking: " + ret); There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, that string may be around somewhere. Please search for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean adding constant like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just changed the getGobal() into getLogger(Packages.streamRefactoring);. If this is what you want, I will change all getLogger("edu.cuny.hunter.streamrefactoring") into getLogger(Packages.streamRefactoring);.
Sorry for the late commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a Constants class in the edu.cuny.hunter.streamrefactoring.core.util package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the constant here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the logger be a field like the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something like LOGGER_NAME?
I thought the new class stores a list of constants for the package names, so I used Packages as a class name. How about the current class name: LoggerNames? |
Ah, I guess we could have individual loggers for packages, but I think one logger for the entire thing is okay for now. Yes, |
#70