You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by GitBox <gi...@apache.org> on 2021/06/23 19:51:44 UTC

[GitHub] [myfaces] volosied opened a new pull request #211: MYFACES-4404 -- Log viewstate string

volosied opened a new pull request #211:
URL: https://github.com/apache/myfaces/pull/211


   https://issues.apache.org/jira/browse/MYFACES-4404


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] volosied commented on pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
volosied commented on pull request #211:
URL: https://github.com/apache/myfaces/pull/211#issuecomment-867756577


   Logging would only be enabled when debugging, so the line could still be useful. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] volosied edited a comment on pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
volosied edited a comment on pull request #211:
URL: https://github.com/apache/myfaces/pull/211#issuecomment-867754249


   We already log it here: https://github.com/apache/myfaces/blob/584d6197a25ab4fdc24aaba5fb00b29ba14d2d0c/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java#L394
   
   Maybe I could log the hash instead?  It's only to look for changes. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] volosied commented on a change in pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
volosied commented on a change in pull request #211:
URL: https://github.com/apache/myfaces/pull/211#discussion_r657426433



##########
File path: impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
##########
@@ -121,6 +121,9 @@ private void writeViewStateField(FacesContext facesContext, ResponseWriter respo
     {
         String serializedState = getStateCache(facesContext).getStateTokenProcessor(facesContext)
                 .encode(facesContext, savedState);
+
+        log.info("Writing serialized viewstate string: " + serializedState);

Review comment:
       Good point! 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] melloware commented on a change in pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
melloware commented on a change in pull request #211:
URL: https://github.com/apache/myfaces/pull/211#discussion_r657421455



##########
File path: impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
##########
@@ -121,6 +121,9 @@ private void writeViewStateField(FacesContext facesContext, ResponseWriter respo
     {
         String serializedState = getStateCache(facesContext).getStateTokenProcessor(facesContext)
                 .encode(facesContext, savedState);
+
+        log.info("Writing serialized viewstate string: " + serializedState);

Review comment:
       This will always concat the string shouldn't you wrap this in something like...
   
   ```
   if (log.isInfoEnabled()) { log.info() )} 
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] tandraschko commented on pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
tandraschko commented on pull request #211:
URL: https://github.com/apache/myfaces/pull/211#issuecomment-867740850


   TBH i dont like that
   viewstate string can be very big with client side state saving and therefore you will spam the logfiles


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] volosied merged pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
volosied merged pull request #211:
URL: https://github.com/apache/myfaces/pull/211


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [myfaces] volosied commented on pull request #211: MYFACES-4404 -- Log viewstate string

Posted by GitBox <gi...@apache.org>.
volosied commented on pull request #211:
URL: https://github.com/apache/myfaces/pull/211#issuecomment-867754249


   We already log it here: https://github.com/apache/myfaces/blob/584d6197a25ab4fdc24aaba5fb00b29ba14d2d0c/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java#L394
   
   Maybe I could log the hash instead?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org