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

[LOGMGR-96] Add hostname format option for the pattern formatter. #53

Closed
wants to merge 1 commit into from

Conversation

jamezp
Copy link
Member

@jamezp jamezp commented Apr 8, 2014

No description provided.

* @return the format step
*/
public static FormatStep hostnameFormatStep(final boolean leftJustify, final int minimumWidth, final boolean truncateBeginning, final int maximumWidth, final boolean qualified) {
final Properties props;
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it shouldn't be done on every log message. The host name is unlikely to change very often, and even if it changed, the props and env wouldn't change with it anyway. Probably just move the detected host name out to a once-only constant.

Copy link
Member Author

Choose a reason for hiding this comment

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

This actually should only be done once or done once each time the pattern is parsed into steps.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, you are correct. Guess it's been a while :)

@jamezp
Copy link
Member Author

jamezp commented Sep 9, 2014

Merged

@jamezp jamezp closed this Sep 9, 2014
@jamezp jamezp deleted the LOGMGR-96b branch September 9, 2014 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants