Skip to content

LUTECE-2196 : Allow to reload the log4j configuration at runtime #140

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jonenst
Copy link
Member

@jonenst jonenst commented May 23, 2018

We should discuss where we want this feature

@@ -68,6 +68,7 @@ manage_caches.actionDisable=Turn off
manage_caches.actionViewKeys=View config and keys
manage_caches.buttonFlush=Flush all
manage_caches.buttonViewKeys=View config and keys
manage_caches.titleReloadLogsConfiguration=Log configuration loading
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't that be "reloading" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I chose the same expression as the other "reloading" button which says "Properties Loading". I don't have a strong opinion

@@ -70,6 +71,10 @@
private static final String TEMPLATE_CACHE_INFOS = "admin/system/cache_infos.html";
private static final String PARAMETER_ID_CACHE = "id_cache";

// Conf
private static final String PATH_CONF = "/WEB-INF/conf/";
private static final String FILE_PROPERTIES_CONFIG = "config.properties";
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you shoud not redefine these constants here, but share them with the normal intialisation process. Otherwise, there is a risk these become desynchronized

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already defined in several places as private constants... Not sure if it's useful to declare them as public constants. Maybe in fr.paris.lutece.portal.web.constants.Parameters ? but it looks like this class is for parameters of http requests.


return JSP_MANAGE_CACHES;
}

Copy link
Member

Choose a reason for hiding this comment

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

You should be able to add tests that

  • ensure the CSRF protection is enforced
  • verify that the log configuration is indeed changed

@@ -7,6 +7,10 @@
<@button type='submit' buttonIcon='refresh' title='#i18n{portal.system.manage_caches.titleReloadProperties}' id='reload' size='' showTitleXs=false showTitleSm=false />
<@aButton href='jsp/admin/system/CacheInfos.jsp' buttonIcon='key' title='#i18n{portal.system.manage_caches.buttonViewKeys}' size='' showTitleXs=false showTitleSm=false />
</@tform>
<@tform method='post' action='jsp/admin/system/DoReloadLogsConfiguration.jsp' class='pull-right spaced'>
<input type="hidden" name="token" value="${token}">
<@button type='submit' buttonIcon='refresh' title='#i18n{portal.system.manage_caches.titleReloadLogsConfiguration}' id='reloadLogsConf' size='' showTitleXs=false showTitleSm=false />
Copy link
Member

Choose a reason for hiding this comment

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

So the button shows no text on small screens ? Since there are no tooltips on smartphone, the purpose of this button might not be obvious

Copy link
Member Author

@jonenst jonenst May 28, 2018

Choose a reason for hiding this comment

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

If we go with having this button on this page, then maybe we can use a single letter to disambiguate ? L and P. Or Logs and Props ? Or Logs and Properties ?
If we put this functionality in another page maybe the "reload" glyph is enough

Copy link
Member

Choose a reason for hiding this comment

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

why not just display the title at all sizes ?

@jonenst
Copy link
Member Author

jonenst commented May 24, 2018

Thanks for the review, I'll fix the problems you found

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

Successfully merging this pull request may close these issues.

2 participants