Skip to content

Conversation

@yiming-tang-cs
Copy link
Contributor

@yiming-tang-cs yiming-tang-cs commented Oct 20, 2017

#70

@khatchad
Copy link
Member

Are we sure these are all the places where loggers are used?

@yiming-tang-cs
Copy link
Contributor Author

There are two Loggers from another two projects: WALA and SAFE. I am not sure whether you need to change it.

@khatchad
Copy link
Member

Nope, we can keep those.

@khatchad
Copy link
Member

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); 
Copy link
Member

@khatchad khatchad left a 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); 
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@khatchad khatchad left a 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); 
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field here as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a package?

Copy link
Member

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?

@khatchad khatchad changed the title improve Logger #70 improve Logger Oct 24, 2017
@yiming-tang-cs
Copy link
Contributor Author

What is a package?

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?

@khatchad
Copy link
Member

What is a package?

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, LoggerNames sounds good.

@khatchad khatchad merged commit 9e0b28d into ponder-lab:master Oct 25, 2017
@khatchad khatchad deleted the issue_70 branch October 25, 2017 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants