You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2009/10/06 01:47:31 UTC

[jira] Created: (MYFACES-2378) Use java util logging on 2.0.x branch

Use java util logging on 2.0.x branch
-------------------------------------

                 Key: MYFACES-2378
                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
             Project: MyFaces Core
          Issue Type: Task
          Components: JSR-314
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763370#action_12763370 ] 

Mario Ivankovits commented on MYFACES-2378:
-------------------------------------------

@grant: We need a hierarchy in the logger name to being able to configure the log levels for the library at a global level.
E.g you can set FINEST level to org.apache.myfaces. which then counts for all loggers. If you just have the logger name, this wont work anymore.

@leonardo: That sounds good, though, the package structure should be close to such a hierarchy already, no? - just that the class names and "org.apache." is added too. Probably the JSF spec should pretend which logger names to use so that one can replace the library without the need to reconfigure the logging ...

> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763148#action_12763148 ] 

Leonardo Uribe commented on MYFACES-2378:
-----------------------------------------

In the patch attached there is a proposal for this change

It uses as key to obtain the logger the full class name in this way:

private static final Logger log = Logger.getLogger(ApplicationImpl.class.getName());

It also follow the convention used by 

http://commons.apache.org/logging/commons-logging-1.1.1/apidocs/org/apache/commons/logging/impl/Jdk14Logger.html

to map logging messages (TRACE -> FINEST, DEBUG -> FINE, ERROR -> SEVERE, FATAL ->SEVERE, INFO -> INFO, WARNING -> WARNING)

If no objections I'll commit this code soon.

> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Jan-Kees van Andel (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764146#action_12764146 ] 

Jan-Kees van Andel commented on MYFACES-2378:
---------------------------------------------

I agree with Leonardo. I think this is also the least surprising thing to do from a user's perspective, since most loggers use the FQCN as key.

> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Grant Smith (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763268#action_12763268 ] 

Grant Smith commented on MYFACES-2378:
--------------------------------------

How about simplifying things a bit with :

private static final Logger log = Logger.getLogger("ApplicationImpl"); ?

> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-2378.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-alpha

> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0-alpha
>
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763282#action_12763282 ] 

Leonardo Uribe commented on MYFACES-2378:
-----------------------------------------

The original facelets code had a hierarchy of loggers in this way:

facelets.viewhandler
facelets.tag.component
facelets.compiler
......

so the Logger is initialized in this way:

private static final Logger log = Logger.getLogger("facelets.viewhandler");

One option to prevent use the full class name is create our own simplified hierarchy, and create a class/interface that holds all this constants:

myfaces.facelets.viewhandler
myfaces.facelets.tag.component
myfaces.application
myfaces.context

.....

but in this case we need a common agreement about how this should looks like. Since this detail impact how configure logging for myfaces, maybe we should vote this change too.



> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763146#action_12763146 ] 

Leonardo Uribe commented on MYFACES-2378:
-----------------------------------------

In the patch attached there is a proposal for this change

It uses as key to obtain the logger the full class name.

It also follow the convention used by 


> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2378) Use java util logging on 2.0.x branch

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763536#action_12763536 ] 

Leonardo Uribe commented on MYFACES-2378:
-----------------------------------------

Ok. After take a look at these arguments, I think it is better to keep the full class name as the key for now, because it is more simple.

> Use java util logging on 2.0.x branch
> -------------------------------------
>
>                 Key: MYFACES-2378
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2378
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-2378-core.patch, MYFACES-2378-shared-core.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.