Author: nbelaevski
Date: 2009-08-27 10:15:58 -0400 (Thu, 27 Aug 2009)
New Revision: 15343
Modified:
root/framework/trunk/impl/src/main/java/org/richfaces/util/Util.java
Log:
Added missing log statements
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/util/Util.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/util/Util.java 2009-08-27
14:10:08 UTC (rev 15342)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/util/Util.java 2009-08-27
14:15:58 UTC (rev 15343)
@@ -70,7 +70,10 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.Messages;
import org.ajax4jsf.util.base64.Codec;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author Nick Belaevski
@@ -78,6 +81,8 @@
*/
public class Util {
+ private static final Logger resourceLogger = RichfacesLogger.RESOURCE.getLogger();
+
private Util() {}
/* HTTP Date format required by the HTTP/1.1 RFC */
@@ -221,9 +226,7 @@
// String(Base64.encodeBase64(objectData),
// / "ISO-8859-1"));
} catch (Exception e) {
- // Ignore errors, log it
-// log.error(Messages
-// .getMessage(Messages.QUERY_STRING_BUILDING_ERROR), e);
+ resourceLogger.error(Messages.getMessage(Messages.QUERY_STRING_BUILDING_ERROR), e);
}
}
@@ -276,11 +279,11 @@
String dataString = null;
Matcher matcher = DATA_SEPARATOR_PATTERN.matcher(resourceUri);
if (matcher.find()) {
-// if (log.isDebugEnabled()) {
-// log.debug(Messages.getMessage(
-// Messages.RESTORE_DATA_FROM_RESOURCE_URI_INFO, resourceUri,
-// dataString));
-// }
+ if (resourceLogger.isDebugEnabled()) {
+ resourceLogger.debug(Messages.getMessage(
+ Messages.RESTORE_DATA_FROM_RESOURCE_URI_INFO, resourceUri,
+ dataString));
+ }
dataString = matcher.group(DATA_SEPARATOR_DATA_GROUP_INDEX);
byte[] objectArray = null;
byte[] dataArray;
@@ -298,18 +301,17 @@
new ByteArrayInputStream(objectArray));
data = in.readObject();
} catch (StreamCorruptedException e) {
-// log.error(Messages
-// .getMessage(Messages.STREAM_CORRUPTED_ERROR), e);
+ resourceLogger.error(Messages
+ .getMessage(Messages.STREAM_CORRUPTED_ERROR), e);
} catch (IOException e) {
-// log.error(Messages
-// .getMessage(Messages.DESERIALIZE_DATA_INPUT_ERROR),
-// e);
+ resourceLogger.error(Messages
+ .getMessage(Messages.DESERIALIZE_DATA_INPUT_ERROR),
+ e);
} catch (ClassNotFoundException e) {
-// log
-// .error(
-// Messages
-// .getMessage(Messages.DATA_CLASS_NOT_FOUND_ERROR),
-// e);
+ resourceLogger.error(
+ Messages
+ .getMessage(Messages.DATA_CLASS_NOT_FOUND_ERROR),
+ e);
}
}
}