You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2012/08/02 01:11:22 UTC
svn commit: r1368306 - in
/myfaces/portlet-bridge/core/branches/refactored_3.0.x: controller-api/
controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/
controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/...
Author: mfreedman
Date: Wed Aug 1 23:11:20 2012
New Revision: 1368306
URL: http://svn.apache.org/viewvc?rev=1368306&view=rev
Log:
Modified to use slf4j logger
Added:
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/src/main/webapp/WEB-INF/classes/logging.properties
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/src/main/webapp/WEB-INF/classes/
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/src/main/webapp/WEB-INF/classes/logging.properties
Modified:
myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContext.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLogger.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/pom.xml
myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContextImpl.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/PreFacesFacesContext.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/controller/BridgeControllerImpl.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLoggerImpl.java
myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/pom.xml Wed Aug 1 23:11:20 2012
@@ -58,6 +58,12 @@
<artifactId>portlet-bridge-api</artifactId>
<groupId>org.apache.myfaces.portlet-bridge</groupId>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
</dependencies>
<build>
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContext.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContext.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContext.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContext.java Wed Aug 1 23:11:20 2012
@@ -26,6 +26,7 @@ import javax.portlet.faces.BridgeDefault
import javax.portlet.faces.BridgeInvalidViewPathException;
import org.apache.myfaces.portlet.faces.bridge.config.BridgeConfig;
+import org.apache.myfaces.portlet.faces.bridge.logger.BridgeLogger;
import org.apache.myfaces.portlet.faces.bridge.scope.BridgeRequestScope;
import org.apache.myfaces.portlet.faces.bridge.scope.BridgeRequestScopeManager;
@@ -514,14 +515,37 @@ public abstract class BridgeContext
*/
public static void log(String s, Throwable t)
{
+ log(s, t, BridgeLogger.LogLevel.INFO);
+ }
+
+
+ public static void log(String s, Throwable t, BridgeLogger.LogLevel level)
+ {
BridgeContext bCtx = getCurrentInstance();
if (bCtx != null)
{
- bCtx.getBridgeConfig().getLogger().log(s, t);
+ switch (level)
+ {
+ case DEBUG:
+ bCtx.getBridgeConfig().getLogger().debug(s, t);
+ break;
+ case ERROR:
+ bCtx.getBridgeConfig().getLogger().error(s, t);
+ break;
+ case INFO:
+ default:
+ bCtx.getBridgeConfig().getLogger().info(s, t);
+ break;
+ case TRACE:
+ bCtx.getBridgeConfig().getLogger().trace(s, t);
+ break;
+ case WARN:
+ bCtx.getBridgeConfig().getLogger().warn(s, t);
+ break;
+ }
}
}
-
/**
* Convenience methods for classes that need to log without having or knowing
* whether they are currently executing in a BridgeContext
@@ -530,11 +554,42 @@ public abstract class BridgeContext
*/
public static void log(String s)
{
+ log(s, BridgeLogger.LogLevel.INFO);
+ }
+
+
+ /**
+ * Convenience methods for classes that need to log without having or knowing
+ * whether they are currently executing in a BridgeContext
+ *
+ * @param s
+ */
+ public static void log(String s, BridgeLogger.LogLevel level )
+ {
BridgeContext bCtx = getCurrentInstance();
if (bCtx != null)
{
- bCtx.getBridgeConfig().getLogger().log(s);
+ switch (level)
+ {
+ case DEBUG:
+ bCtx.getBridgeConfig().getLogger().debug(s);
+ break;
+ case ERROR:
+ bCtx.getBridgeConfig().getLogger().error(s);
+ break;
+ case INFO:
+ default:
+ bCtx.getBridgeConfig().getLogger().info(s);
+ break;
+ case TRACE:
+ bCtx.getBridgeConfig().getLogger().trace(s);
+ break;
+ case WARN:
+ bCtx.getBridgeConfig().getLogger().warn(s);
+ break;
+ }
}
+
}
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLogger.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLogger.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLogger.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/controller-api/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLogger.java Wed Aug 1 23:11:20 2012
@@ -12,29 +12,25 @@
package org.apache.myfaces.portlet.faces.bridge.logger;
-
+import javax.portlet.faces.Bridge.PortletPhase;
/**
* Stub -- to be added
*/
-public interface BridgeLogger
+public interface BridgeLogger extends org.slf4j.Logger
{
- public static final String LOGGING_ENABLED_PORTLET_INIT_PARAM = "org.apache.myfaces.portlet.faces.loggingEnabled";
-
- public void log(String msg);
-
- public void log(String message, Throwable throwable);
-
- public boolean isEnabled();
-
- public void setEnabled(Boolean enable);
-
- public void setEnabled(boolean enable);
-
- public int getLogLevel();
-
- public void setLogLevel(int logLevel);
+
+ public static enum LogLevel
+ {
+ DEBUG,
+ ERROR,
+ INFO,
+ TRACE,
+ WARN,
+ ;
+ }
+
}
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/pom.xml Wed Aug 1 23:11:20 2012
@@ -93,6 +93,46 @@
</plugins>
</build>
</profile>
+
+<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
+ <profile>
+ <id>pluto2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.portals.pluto</groupId>
+ <artifactId>maven-pluto-plugin</artifactId>
+ <version>2.0.0</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
<!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
<profile>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/blank/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/pom.xml Wed Aug 1 23:11:20 2012
@@ -128,6 +128,16 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
@@ -154,6 +164,7 @@
</plugins>
</build>
</profile>
+
<!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
<profile>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/carstore/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/pom.xml Wed Aug 1 23:11:20 2012
@@ -123,6 +123,16 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/facelets-guess/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/pom.xml Wed Aug 1 23:11:20 2012
@@ -127,6 +127,16 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumber/src/main/webapp/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+#
+# JDK 1.4+ logging handler specific properties for Pluto portal
+# using Tomcat's custom implementation of LogManager.
+# Logging level can be set to any one of:
+# SEVERE, WARN, INFO, CONFIG, FINE, FINEST or ALL.
+# See the Tomcat documentation for more details.
+#
+############################################################
+
+org.apache.juli.FileHandler.level = ALL
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+#Log file will be named bridge.<yyyy-mm-dd>.log
+org.apache.juli.FileHandler.prefix = bridge.
+
+java.util.logging.ConsoleHandler.level = ALL
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+
+
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/pom.xml Wed Aug 1 23:11:20 2012
@@ -127,6 +127,16 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMojarraFilter/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/pom.xml Wed Aug 1 23:11:20 2012
@@ -127,6 +127,16 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/guessNumberMyFacesFilter/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/pom.xml Wed Aug 1 23:11:20 2012
@@ -122,6 +122,7 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDuke/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/pom.xml?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/pom.xml (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/pom.xml Wed Aug 1 23:11:20 2012
@@ -122,6 +122,16 @@
<!-- sets up the webapp for deployment to pluto 2.0 (this is included as its the command in 1.0 for building to 2 - i.e. backwards compat) "mvn clean install -Ppluto2" -->
<profile>
<id>pluto2</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
Added: myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/src/main/webapp/WEB-INF/classes/logging.properties
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/src/main/webapp/WEB-INF/classes/logging.properties?rev=1368306&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/src/main/webapp/WEB-INF/classes/logging.properties (added)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/examples/helloDukeCoordination/src/main/webapp/WEB-INF/classes/logging.properties Wed Aug 1 23:11:20 2012
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+#
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+org.apache.juli.FileHandler.level = FINE
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+org.apache.juli.FileHandler.prefix = portletbridge.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+org.apache.myfaces.portlet.faces.bridge.logger.BridgeLoggerImpl.level = ALL
\ No newline at end of file
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/BridgeImpl.java Wed Aug 1 23:11:20 2012
@@ -65,7 +65,6 @@ import org.apache.myfaces.portlet.faces.
import org.apache.myfaces.portlet.faces.bridge.factory.BridgeContextFactory;
import org.apache.myfaces.portlet.faces.bridge.factory.BridgeControllerFactory;
import org.apache.myfaces.portlet.faces.bridge.factory.BridgeFactoryFinder;
-import org.apache.myfaces.portlet.faces.bridge.logger.BridgeLogger;
import org.apache.myfaces.portlet.faces.util.config.FacesConfigurationProcessor;
import org.apache.myfaces.portlet.faces.util.config.WebConfigurationProcessor;
@@ -219,13 +218,7 @@ public class BridgeImpl
bConfig.setPortletConfig(config);
- PortletContext portletContext = config.getPortletContext();
-
- // See if the bridge should log informational messages
- Boolean enableLogging = (Boolean) portletContext.getAttribute(Bridge.BRIDGE_PACKAGE_PREFIX + config.getPortletName() +
- "." + BridgeLogger.LOGGING_ENABLED_PORTLET_INIT_PARAM);
- bConfig.getLogger().setEnabled((enableLogging != null) ? enableLogging : Boolean.FALSE);
-
+ PortletContext portletContext = config.getPortletContext();
// get bridgeEventHandler, processPublicRenderParameterHandler, preserveActionParams, excludedAttributes configuration settings.
bConfig.setEventHandler((BridgeEventHandler) portletContext.getAttribute(Bridge.BRIDGE_PACKAGE_PREFIX + config.getPortletName() +
@@ -325,7 +318,7 @@ public class BridgeImpl
// Do nothing if we don't have a BriegeEventHandler
if (mBridgeConfig.getEventHandler() == null)
{
- mBridgeConfig.getLogger().log("WARNING: Received an event but there is no event handler registered by this portlet in the bridge.");
+ mBridgeConfig.getLogger().info("WARNING: Received an event but there is no event handler registered by this portlet in the bridge.");
return;
}
}
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContextImpl.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContextImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/BridgeContextImpl.java Wed Aug 1 23:11:20 2012
@@ -874,7 +874,7 @@ public class BridgeContextImpl extends B
}
// TODO:
- if (viewId != null) mBridgeConfig.getLogger().log("BridgeContextImpl.getViewId: found jsf target viewId = " + viewId);
+ if (viewId != null) mBridgeConfig.getLogger().info("BridgeContextImpl.getViewId: found jsf target viewId = " + viewId);
// ViewIds stored in RenderParams are encoded with the Mode to which they apply
// Ensure current request Mode matches before using the viewId portion
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/PreFacesFacesContext.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/PreFacesFacesContext.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/PreFacesFacesContext.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/context/PreFacesFacesContext.java Wed Aug 1 23:11:20 2012
@@ -477,12 +477,12 @@ public class PreFacesFacesContext
public void log(String message)
{
- mBridgeConfig.getLogger().log(message);
+ mBridgeConfig.getLogger().info(message);
}
public void log(String message, Throwable exception)
{
- mBridgeConfig.getLogger().log(message, exception);
+ mBridgeConfig.getLogger().info(message, exception);
}
public void redirect(String url)
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/controller/BridgeControllerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/controller/BridgeControllerImpl.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/controller/BridgeControllerImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/controller/BridgeControllerImpl.java Wed Aug 1 23:11:20 2012
@@ -199,8 +199,8 @@ public class BridgeControllerImpl
}
catch (Exception e)
{
- if (bCtx.getBridgeConfig().getLogger().isEnabled())
- bCtx.getBridgeConfig().getLogger().log("Exception thrown in doFacesRequest:action", e);
+ if (bCtx.getBridgeConfig().getLogger().isErrorEnabled())
+ bCtx.getBridgeConfig().getLogger().error("Exception thrown in doFacesRequest:action", e);
if (!(e instanceof BridgeException))
{
@@ -240,7 +240,7 @@ public class BridgeControllerImpl
// Do nothing if we don't have a BridgeEventHandler
if (bCtx.getBridgeConfig().getEventHandler() == null)
{
- bCtx.getBridgeConfig().getLogger().log("Bridge has been sent an event but has no registered event handler. Returning without processing the event.");
+ bCtx.getBridgeConfig().getLogger().info("Bridge has been sent an event but has no registered event handler. Returning without processing the event.");
return;
}
@@ -306,8 +306,8 @@ public class BridgeControllerImpl
}
catch (Exception e)
{
- if (bCtx.getBridgeConfig().getLogger().isEnabled())
- bCtx.getBridgeConfig().getLogger().log("Exception thrown in doFacesRequest:event", e);
+ if (bCtx.getBridgeConfig().getLogger().isErrorEnabled())
+ bCtx.getBridgeConfig().getLogger().error("Exception thrown in doFacesRequest:event", e);
if (!(e instanceof BridgeException))
{
@@ -403,8 +403,8 @@ public class BridgeControllerImpl
// get context as it may have been reacquired if exception occurred during redirect during render.
fCtx = FacesContext.getCurrentInstance();
- if (bCtx.getBridgeConfig().getLogger().isEnabled())
- bCtx.getBridgeConfig().getLogger().log("Exception thrown in doFacesRequest:render", e);
+ if (bCtx.getBridgeConfig().getLogger().isErrorEnabled())
+ bCtx.getBridgeConfig().getLogger().error("Exception thrown in doFacesRequest:render", e);
if (!(e instanceof BridgeException))
{
@@ -477,8 +477,8 @@ public class BridgeControllerImpl
}
catch (Exception e)
{
- if (bCtx.getBridgeConfig().getLogger().isEnabled())
- bCtx.getBridgeConfig().getLogger().log("Exception thrown in doFacesRequest:resource", e);
+ if (bCtx.getBridgeConfig().getLogger().isErrorEnabled())
+ bCtx.getBridgeConfig().getLogger().error("Exception thrown in doFacesRequest:resource", e);
if (!(e instanceof BridgeException))
{
@@ -555,7 +555,7 @@ public class BridgeControllerImpl
}
catch (Exception e)
{
- BridgeContext.log("Unexpected problem notifying object with BridgeRequestScopeAdded annotation.", e);
+ bCtx.getBridgeConfig().getLogger().info("Unexpected problem notifying object with BridgeRequestScopeAdded annotation.", e);
}
}
}
@@ -1445,7 +1445,7 @@ public class BridgeControllerImpl
private void dumpScope(BridgeContext bCtx, String phase)
{
- if (bCtx == null || !bCtx.getBridgeConfig().getLogger().isEnabled()) return;
+ if (bCtx == null || !bCtx.getBridgeConfig().getLogger().isInfoEnabled()) return;
// Get the data from the scope
BridgeLogger logger = bCtx.getBridgeConfig().getLogger();
@@ -1454,22 +1454,22 @@ public class BridgeControllerImpl
if (scope != null)
{
- logger.log("dumpScope: " + phase);
- logger.log("Elements in scope: " + scope.getPortletMode() + " : " + scope.getViewId());
+ logger.info("dumpScope: " + phase);
+ logger.info("Elements in scope: " + scope.getPortletMode() + " : " + scope.getViewId());
}
else
{
- logger.log("dumpScope: " + phase + " : Scope not established.");
+ logger.info("dumpScope: " + phase + " : Scope not established.");
return;
}
for (String s : scope.keySet())
{
- logger.log(" " + s);
+ logger.info(" " + s);
}
- logger.log("end dumpScope");
+ logger.info("end dumpScope");
}
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLoggerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLoggerImpl.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLoggerImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/bridge/logger/BridgeLoggerImpl.java Wed Aug 1 23:11:20 2012
@@ -16,6 +16,7 @@ import org.apache.myfaces.portlet.faces.
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.slf4j.Marker;
/**
@@ -29,60 +30,847 @@ public class BridgeLoggerImpl implements
private BridgeConfig mBridgeConfig;
- private boolean mIsEnabled = false;
- private int mLogLevel;
public BridgeLoggerImpl(BridgeConfig config)
{
mBridgeConfig = config;
}
-
- public void log(String msg)
+
+ /**
+ * Return the name of this <code>Logger</code> instance.
+ */
+ public String getName()
{
- if (isEnabled())
- {
- LOG.debug(msg);
- }
+ return LOG.getName();
}
-
- public void log(String msg, Throwable throwable)
+
+ /**
+ * Is the logger instance enabled for the TRACE level?
+ * @return True if this Logger is enabled for the TRACE level,
+ * false otherwise.
+ *
+ * @since 1.4
+ */
+ public boolean isTraceEnabled()
{
- if (isEnabled())
- {
- LOG.debug(msg, throwable);
- }
+ return LOG.isTraceEnabled();
}
-
- public boolean isEnabled()
+
+
+ /**
+ * Log a message at the TRACE level.
+ *
+ * @param msg the message string to be logged
+ * @since 1.4
+ */
+ public void trace(String msg)
{
- return (mIsEnabled || LOG.isDebugEnabled() || LOG.isErrorEnabled() || LOG.isWarnEnabled() || LOG.isTraceEnabled() || LOG.isInfoEnabled());
+ LOG.trace(msg);
}
-
- public void setEnabled(Boolean enable)
+
+
+ /**
+ * Log a message at the TRACE level according to the specified format
+ * and argument.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the TRACE level. </p>
+ *
+ * @param format the format string
+ * @param arg the argument
+ *
+ * @since 1.4
+ */
+ public void trace(String format, Object arg)
{
- if (enable != null)
- {
- mIsEnabled = enable.booleanValue();
- }
- else
- {
- mIsEnabled = false;
- }
+ LOG.trace(format, arg);
}
-
- public void setEnabled(boolean enable)
+
+
+ /**
+ * Log a message at the TRACE level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the TRACE level. </p>
+ *
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ *
+ * @since 1.4
+ */
+ public void trace(String format, Object arg1, Object arg2)
{
- mIsEnabled = enable;
+ LOG.trace(format, arg1, arg2);
}
-
- public int getLogLevel()
+
+ /**
+ * Log a message at the TRACE level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the TRACE level. </p>
+ *
+ * @param format the format string
+ * @param argArray an array of arguments
+ *
+ * @since 1.4
+ */
+ public void trace(String format, Object[] argArray)
{
- return mLogLevel;
+ LOG.trace(format, argArray);
}
-
- public void setLogLevel(int level)
+
+ /**
+ * Log an exception (throwable) at the TRACE level with an
+ * accompanying message.
+ *
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ *
+ * @since 1.4
+ */
+ public void trace(String msg, Throwable t)
{
- mLogLevel = level;
+ LOG.trace(msg, t);
}
-
-}
\ No newline at end of file
+
+ /**
+ * Similar to {@link #isTraceEnabled()} method except that the
+ * marker data is also taken into account.
+ *
+ * @param marker The marker data to take into consideration
+ *
+ * @since 1.4
+ */
+ public boolean isTraceEnabled(Marker marker)
+ {
+ return LOG.isTraceEnabled(marker);
+ }
+
+ /**
+ * Log a message with the specific Marker at the TRACE level.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param msg the message string to be logged
+ *
+ * @since 1.4
+ */
+ public void trace(Marker marker, String msg)
+ {
+ LOG.trace(marker, msg);
+ }
+
+ /**
+ * This method is similar to {@link #trace(String, Object)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg the argument
+ *
+ * @since 1.4
+ */
+ public void trace(Marker marker, String format, Object arg)
+ {
+ LOG.trace(marker, format, arg);
+ }
+
+
+ /**
+ * This method is similar to {@link #trace(String, Object, Object)}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ *
+ * @since 1.4
+ */
+ public void trace(Marker marker, String format, Object arg1,
+ Object arg2)
+ {
+ LOG.trace(marker, format, arg1, arg2);
+ }
+
+ /**
+ * This method is similar to {@link #trace(String, Object[])}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param argArray an array of arguments
+ *
+ * @since 1.4
+ */
+ public void trace(Marker marker, String format, Object[] argArray)
+ {
+ LOG.trace(marker, format, argArray);
+ }
+
+
+ /**
+ * This method is similar to {@link #trace(String, Throwable)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ *
+ * @since 1.4
+ */
+ public void trace(Marker marker, String msg, Throwable t)
+ {
+ LOG.trace(marker, msg, t);
+ }
+
+
+ /**
+ * Is the logger instance enabled for the DEBUG level?
+ * @return True if this Logger is enabled for the DEBUG level,
+ * false otherwise.
+ *
+ */
+ public boolean isDebugEnabled()
+ {
+ return LOG.isDebugEnabled();
+ }
+
+
+ /**
+ * Log a message at the DEBUG level.
+ *
+ * @param msg the message string to be logged
+ */
+ public void debug(String msg)
+ {
+ LOG.debug(msg);
+ }
+
+
+ /**
+ * Log a message at the DEBUG level according to the specified format
+ * and argument.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the DEBUG level. </p>
+ *
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void debug(String format, Object arg)
+ {
+ LOG.debug(format, arg);
+ }
+
+
+ /**
+ * Log a message at the DEBUG level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the DEBUG level. </p>
+ *
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void debug(String format, Object arg1, Object arg2)
+ {
+ LOG.debug(format, arg1, arg2);
+ }
+
+ /**
+ * Log a message at the DEBUG level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the DEBUG level. </p>
+ *
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void debug(String format, Object[] argArray)
+ {
+ LOG.debug(format, argArray);
+ }
+
+ /**
+ * Log an exception (throwable) at the DEBUG level with an
+ * accompanying message.
+ *
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void debug(String msg, Throwable t)
+ {
+ LOG.debug(msg, t);
+ }
+
+
+ /**
+ * Similar to {@link #isDebugEnabled()} method except that the
+ * marker data is also taken into account.
+ *
+ * @param marker The marker data to take into consideration
+ */
+ public boolean isDebugEnabled(Marker marker)
+ {
+ return LOG.isDebugEnabled();
+ }
+
+ /**
+ * Log a message with the specific Marker at the DEBUG level.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param msg the message string to be logged
+ */
+ public void debug(Marker marker, String msg)
+ {
+ LOG.debug(marker, msg);
+ }
+
+ /**
+ * This method is similar to {@link #debug(String, Object)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void debug(Marker marker, String format, Object arg)
+ {
+ LOG.debug(marker, format, arg);
+ }
+
+
+ /**
+ * This method is similar to {@link #debug(String, Object, Object)}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void debug(Marker marker, String format, Object arg1,
+ Object arg2)
+ {
+ LOG.debug(marker, format, arg1, arg2);
+ }
+
+ /**
+ * This method is similar to {@link #debug(String, Object[])}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void debug(Marker marker, String format, Object[] argArray)
+ {
+ LOG.debug(marker, format, argArray);
+ }
+
+
+ /**
+ * This method is similar to {@link #debug(String, Throwable)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void debug(Marker marker, String msg, Throwable t)
+ {
+ LOG.debug(marker, msg, t);
+ }
+
+
+ /**
+ * Is the logger instance enabled for the INFO level?
+ * @return True if this Logger is enabled for the INFO level,
+ * false otherwise.
+ */
+ public boolean isInfoEnabled()
+ {
+ return LOG.isInfoEnabled();
+ }
+
+
+ /**
+ * Log a message at the INFO level.
+ *
+ * @param msg the message string to be logged
+ */
+ public void info(String msg)
+ {
+ LOG.info(msg);
+ }
+
+
+ /**
+ * Log a message at the INFO level according to the specified format
+ * and argument.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the INFO level. </p>
+ *
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void info(String format, Object arg)
+ {
+ LOG.info(format, arg);
+ }
+
+
+ /**
+ * Log a message at the INFO level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the INFO level. </p>
+ *
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void info(String format, Object arg1, Object arg2)
+ {
+ LOG.info(format, arg1, arg2);
+ }
+
+ /**
+ * Log a message at the INFO level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the INFO level. </p>
+ *
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void info(String format, Object[] argArray)
+ {
+ LOG.info(format, argArray);
+ }
+
+ /**
+ * Log an exception (throwable) at the INFO level with an
+ * accompanying message.
+ *
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void info(String msg, Throwable t)
+ {
+ LOG.info(msg, t);
+ }
+
+ /**
+ * Similar to {@link #isInfoEnabled()} method except that the marker
+ * data is also taken into consideration.
+ *
+ * @param marker The marker data to take into consideration
+ */
+ public boolean isInfoEnabled(Marker marker)
+ {
+ return LOG.isInfoEnabled(marker);
+ }
+
+ /**
+ * Log a message with the specific Marker at the INFO level.
+ *
+ * @param marker The marker specific to this log statement
+ * @param msg the message string to be logged
+ */
+ public void info(Marker marker, String msg)
+ {
+ LOG.info(marker, msg);
+ }
+
+ /**
+ * This method is similar to {@link #info(String, Object)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void info(Marker marker, String format, Object arg)
+ {
+ LOG.info(marker, format, arg);
+ }
+
+ /**
+ * This method is similar to {@link #info(String, Object, Object)}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void info(Marker marker, String format, Object arg1, Object arg2)
+ {
+ LOG.info(marker, format, arg1, arg2);
+ }
+
+
+ /**
+ * This method is similar to {@link #info(String, Object[])}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void info(Marker marker, String format, Object[] argArray)
+ {
+ LOG.info(marker, format, argArray);
+ }
+
+
+ /**
+ * This method is similar to {@link #info(String, Throwable)} method
+ * except that the marker data is also taken into consideration.
+ *
+ * @param marker the marker data for this log statement
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void info(Marker marker, String msg, Throwable t)
+ {
+ LOG.info(marker, msg, t);
+ }
+
+
+ /**
+ * Is the logger instance enabled for the WARN level?
+ * @return True if this Logger is enabled for the WARN level,
+ * false otherwise.
+ */
+ public boolean isWarnEnabled()
+ {
+ return LOG.isWarnEnabled();
+ }
+
+ /**
+ * Log a message at the WARN level.
+ *
+ * @param msg the message string to be logged
+ */
+ public void warn(String msg)
+ {
+ LOG.warn(msg);
+ }
+
+ /**
+ * Log a message at the WARN level according to the specified format
+ * and argument.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the WARN level. </p>
+ *
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void warn(String format, Object arg)
+ {
+ LOG.warn(format, arg);
+ }
+
+
+ /**
+ * Log a message at the WARN level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the WARN level. </p>
+ *
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void warn(String format, Object[] argArray)
+ {
+ LOG.warn(format, argArray);
+ }
+
+ /**
+ * Log a message at the WARN level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the WARN level. </p>
+ *
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void warn(String format, Object arg1, Object arg2)
+ {
+ LOG.warn(format, arg1, arg2);
+ }
+
+ /**
+ * Log an exception (throwable) at the WARN level with an
+ * accompanying message.
+ *
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void warn(String msg, Throwable t)
+ {
+ LOG.warn(msg, t);
+ }
+
+
+ /**
+ * Similar to {@link #isWarnEnabled()} method except that the marker
+ * data is also taken into consideration.
+ *
+ * @param marker The marker data to take into consideration
+ */
+ public boolean isWarnEnabled(Marker marker)
+ {
+ return LOG.isWarnEnabled(marker);
+ }
+
+ /**
+ * Log a message with the specific Marker at the WARN level.
+ *
+ * @param marker The marker specific to this log statement
+ * @param msg the message string to be logged
+ */
+ public void warn(Marker marker, String msg)
+ {
+ LOG.warn(marker, msg);
+ }
+
+ /**
+ * This method is similar to {@link #warn(String, Object)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void warn(Marker marker, String format, Object arg)
+ {
+ LOG.warn(marker, format, arg);
+ }
+
+ /**
+ * This method is similar to {@link #warn(String, Object, Object)}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void warn(Marker marker, String format, Object arg1, Object arg2)
+ {
+ LOG.warn(marker, format, arg1, arg2);
+ }
+
+ /**
+ * This method is similar to {@link #warn(String, Object[])}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void warn(Marker marker, String format, Object[] argArray)
+ {
+ LOG.warn(marker, format, argArray);
+ }
+
+
+ /**
+ * This method is similar to {@link #warn(String, Throwable)} method
+ * except that the marker data is also taken into consideration.
+ *
+ * @param marker the marker data for this log statement
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void warn(Marker marker, String msg, Throwable t)
+ {
+ LOG.warn(marker, msg, t);
+ }
+
+
+ /**
+ * Is the logger instance enabled for the ERROR level?
+ * @return True if this Logger is enabled for the ERROR level,
+ * false otherwise.
+ */
+ public boolean isErrorEnabled()
+ {
+ return LOG.isErrorEnabled();
+ }
+
+ /**
+ * Log a message at the ERROR level.
+ *
+ * @param msg the message string to be logged
+ */
+ public void error(String msg)
+ {
+ LOG.error(msg);
+ }
+
+ /**
+ * Log a message at the ERROR level according to the specified format
+ * and argument.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the ERROR level. </p>
+ *
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void error(String format, Object arg)
+ {
+ LOG.error(format, arg);
+ }
+
+ /**
+ * Log a message at the ERROR level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the ERROR level. </p>
+ *
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void error(String format, Object arg1, Object arg2)
+ {
+ LOG.error(format, arg1, arg2);
+ }
+
+ /**
+ * Log a message at the ERROR level according to the specified format
+ * and arguments.
+ *
+ * <p>This form avoids superfluous object creation when the logger
+ * is disabled for the ERROR level. </p>
+ *
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void error(String format, Object[] argArray)
+ {
+ LOG.error(format, argArray);
+ }
+
+ /**
+ * Log an exception (throwable) at the ERROR level with an
+ * accompanying message.
+ *
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void error(String msg, Throwable t)
+ {
+ LOG.error(msg, t);
+ }
+
+
+ /**
+ * Similar to {@link #isErrorEnabled()} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker The marker data to take into consideration
+ */
+ public boolean isErrorEnabled(Marker marker)
+ {
+ return LOG.isErrorEnabled(marker);
+ }
+
+ /**
+ * Log a message with the specific Marker at the ERROR level.
+ *
+ * @param marker The marker specific to this log statement
+ * @param msg the message string to be logged
+ */
+ public void error(Marker marker, String msg)
+ {
+ LOG.error(marker, msg);
+ }
+
+ /**
+ * This method is similar to {@link #error(String, Object)} method except that the
+ * marker data is also taken into consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg the argument
+ */
+ public void error(Marker marker, String format, Object arg)
+ {
+ LOG.error(marker, format, arg);
+ }
+
+ /**
+ * This method is similar to {@link #error(String, Object, Object)}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param arg1 the first argument
+ * @param arg2 the second argument
+ */
+ public void error(Marker marker, String format, Object arg1,
+ Object arg2)
+ {
+ LOG.error(marker, format, arg1, arg2);
+ }
+
+ /**
+ * This method is similar to {@link #error(String, Object[])}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param format the format string
+ * @param argArray an array of arguments
+ */
+ public void error(Marker marker, String format, Object[] argArray)
+ {
+ LOG.error(marker, format, argArray);
+ }
+
+
+ /**
+ * This method is similar to {@link #error(String, Throwable)}
+ * method except that the marker data is also taken into
+ * consideration.
+ *
+ * @param marker the marker data specific to this log statement
+ * @param msg the message accompanying the exception
+ * @param t the exception (throwable) to log
+ */
+ public void error(Marker marker, String msg, Throwable t)
+ {
+ LOG.error(marker, msg, t);
+ }
+
+
+}
Modified: myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java?rev=1368306&r1=1368305&r2=1368306&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java (original)
+++ myfaces/portlet-bridge/core/branches/refactored_3.0.x/impl/src/main/java/org/apache/myfaces/portlet/faces/context/PortletExternalContextImpl.java Wed Aug 1 23:11:20 2012
@@ -1406,13 +1406,13 @@ public class PortletExternalContextImpl
@Override
public void log(String message)
{
- mBridgeContext.getBridgeConfig().getLogger().log(message);
+ mBridgeContext.getBridgeConfig().getLogger().info(message);
}
@Override
public void log(String message, Throwable t)
{
- mBridgeContext.getBridgeConfig().getLogger().log(message, t);
+ mBridgeContext.getBridgeConfig().getLogger().info(message, t);
}
@Override
@@ -1873,7 +1873,7 @@ public class PortletExternalContextImpl
{
//TODO: What should I do here. It would be cool to render out an
//error page to display in the portlet
- BridgeContext.getCurrentInstance().getBridgeConfig().getLogger().log("*****Status Code: "+ statusCode);
+ BridgeContext.getCurrentInstance().getBridgeConfig().getLogger().info("*****Status Code: "+ statusCode);
}
@Override
@@ -1909,7 +1909,7 @@ public class PortletExternalContextImpl
private void debugLog(String message)
{
- if (getBridgeContext().getBridgeConfig().getLogger().isEnabled())
+ if (getBridgeContext().getBridgeConfig().getLogger().isInfoEnabled())
{
log(message);
}