[ 
https://issues.apache.org/jira/browse/MYFACES-3235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070573#comment-13070573
 ] 

Leonardo Uribe commented on MYFACES-3235:
-----------------------------------------

In theory the intention of use a wrapper over logging code is use some kind of 
keys to retrieve messages from a ResourceBundle or something like that. 
Additionally, the patch shows a new hierarchy of logging:

+
+    private static final String LOGGER_NAME_PREFIX = "org.apache.myfaces.";
+
+    /** for javax.faces.application and related  */
+    public static final MyfacesLogger APPLICATION_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "application");
+
+    /** for javax.faces.component and related  */
+    public static final MyfacesLogger COMPONENT_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "component");
+
+    /** for javax.faces.component.html and related  */
+    public static final MyfacesLogger COMPONENT_HTML_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "component.html");
+
+    /** for javax.faces.component.behavior and related  */
+    public static final MyfacesLogger COMPONENT_BEHAVIOR_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "component.behavior");
+
+    /** for javax.faces.component.visit and related  */
+    public static final MyfacesLogger COMPONENT_VISIT_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "component.visit");
+
+    /** for javax.faces.context and related  */
+    public static final MyfacesLogger CONTEXT_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "context");
+
+    /** for javax.faces.convert and related  */
+    public static final MyfacesLogger CONVERT_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "convert");
+
+    /** for javax.faces.event and related  */
+    public static final MyfacesLogger EVENT_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "event");
+
+    /** for javax.faces.lifecycle and related  */
+    public static final MyfacesLogger LIFECYCLE_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "lifecycle");
+
+    /** for javax.faces.model and related  */
+    public static final MyfacesLogger MODEL_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "model");
+
+    /** for javax.faces.render and related  */
+    public static final MyfacesLogger RENDER_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "render");
+
+    /** for javax.faces.validator and related  */
+    public static final MyfacesLogger VALIDATOR_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "validator");
+
+    /** for javax.faces.view and related  */
+    public static final MyfacesLogger VIEW_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "view");
+
+    /** for javax.faces.view.facelets and related  */
+    public static final MyfacesLogger VIEW_FACELETS_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "view.facelets");
+
+    /** for {@link Resource} and related  (does not have own javax.faces. 
package) */
+    public static final MyfacesLogger RESOURCE_LOGGER = 
MyfacesLogger.createMyfacesLogger(LOGGER_NAME_PREFIX + "resource");
+

Instead use the className. I agree keep things like are working right now makes 
easier debugging, because once an issue is solved, other users found the 
message more easily. Use the "className" logger to log a message make easier to 
find where the log was created, but from othe point of view, but log 
configuration is difficult because you have to know all classes that uses a log 
and that is not nice. Sometimes I founded on the spec things like "... log a 
localized message ...." that obviously myfaces is not doing, but does not 
suppose a problem.

I think this requires more discussion on the dev list. I think we can do this 
change, but a clear proposal is required for the community to advance.

> Create infrastructure for improved logging 
> -------------------------------------------
>
>                 Key: MYFACES-3235
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3235
>             Project: MyFaces Core
>          Issue Type: Sub-task
>          Components: General
>            Reporter: Martin Kočí
>            Assignee: Martin Kočí
>            Priority: Minor
>         Attachments: MYFACES-3235.patch
>
>
> Create classes like MyfacesLogger, MyfacesLogRecord etc. like Trinidad has.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to