You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/05/26 12:33:03 UTC
[02/12] git commit: ISIS-793: make configuration of
logging.properties easier to override.
ISIS-793: make configuration of logging.properties easier to override.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/d0db510f
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/d0db510f
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/d0db510f
Branch: refs/heads/master
Commit: d0db510ff698d65309496e619b49216e5c314fe3
Parents: d887d84
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon May 26 10:57:40 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon May 26 10:57:40 2014 +0100
----------------------------------------------------------------------
.../wicket/viewer/IsisWicketApplication.java | 26 ++++++++++++++------
1 file changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/d0db510f/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index bddf816..85986e5 100644
--- a/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -212,16 +212,9 @@ public class IsisWicketApplication extends AuthenticatedWebApplication implement
configureWebJars();
-
String isisConfigDir = getServletContext().getInitParameter("isis.config.dir");
- final String loggingPropertiesDir;
- if(isisConfigDir != null) {
- loggingPropertiesDir = isisConfigDir;
- } else {
- loggingPropertiesDir = getServletContext().getRealPath("/WEB-INF");
- }
- loggingConfigurer.configureLogging(loggingPropertiesDir, new String[0]);
+ configureLogging(isisConfigDir);
getRequestCycleSettings().setRenderStrategy(RenderStrategy.REDIRECT_TO_RENDER);
@@ -312,6 +305,23 @@ public class IsisWicketApplication extends AuthenticatedWebApplication implement
// //////////////////////////////////////
/**
+ * Factored out for easy (informal) pluggability.
+ */
+ protected void configureLogging(String isisConfigDir) {
+ final String loggingPropertiesDir;
+ if(isisConfigDir != null) {
+ loggingPropertiesDir = isisConfigDir;
+ } else {
+ loggingPropertiesDir = getServletContext().getRealPath("/WEB-INF");
+ }
+
+ loggingConfigurer.configureLogging(loggingPropertiesDir, new String[0]);
+ }
+
+
+ // //////////////////////////////////////
+
+ /**
* The validation errors, if any, that occurred on {@link #init() startup}.
*/
public List<String> getValidationErrors() {