You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Jan (JIRA)" <ji...@apache.org> on 2012/10/23 20:17:14 UTC

[jira] [Created] (SHIRO-391) Enable Principal in Logs using SLF4J MDC

Jan created SHIRO-391:
-------------------------

             Summary: Enable Principal in Logs using SLF4J MDC
                 Key: SHIRO-391
                 URL: https://issues.apache.org/jira/browse/SHIRO-391
             Project: Shiro
          Issue Type: Improvement
            Reporter: Jan
            Priority: Minor


Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.

The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (SHIRO-391) Enable Principal in Logs using SLF4J MDC

Posted by "Jan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan updated SHIRO-391:
----------------------

    Description: 
Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.

The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.

Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

  was:
Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.

The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.

    
> Enable Principal in Logs using SLF4J MDC
> ----------------------------------------
>
>                 Key: SHIRO-391
>                 URL: https://issues.apache.org/jira/browse/SHIRO-391
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Jan
>            Priority: Minor
>         Attachments: ThreadContext.java.patch
>
>
> Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.
> The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.
> Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (SHIRO-391) Enable Principal in Logs using SLF4J MDC

Posted by "Jan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan updated SHIRO-391:
----------------------

    Attachment: ThreadContext.java.patch

A patch adding the functionality.
                
> Enable Principal in Logs using SLF4J MDC
> ----------------------------------------
>
>                 Key: SHIRO-391
>                 URL: https://issues.apache.org/jira/browse/SHIRO-391
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Jan
>            Priority: Minor
>         Attachments: ThreadContext.java.patch
>
>
> Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.
> The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SHIRO-391) Enable Principal in Logs using SLF4J MDC

Posted by "Jared Bunting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482569#comment-13482569 ] 

Jared Bunting commented on SHIRO-391:
-------------------------------------

I like this a lot.  If there are no objections, I'll add this patch shortly.
                
> Enable Principal in Logs using SLF4J MDC
> ----------------------------------------
>
>                 Key: SHIRO-391
>                 URL: https://issues.apache.org/jira/browse/SHIRO-391
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Jan
>            Assignee: Jared Bunting
>            Priority: Minor
>         Attachments: ThreadContext.java.patch
>
>
> Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.
> The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.
> Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (SHIRO-391) Enable Principal in Logs using SLF4J MDC

Posted by "Jan Stamer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Stamer updated SHIRO-391:
-----------------------------

    Description: 
Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.

The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %X{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.

Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

  was:
Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.

The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.

Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

    
> Enable Principal in Logs using SLF4J MDC
> ----------------------------------------
>
>                 Key: SHIRO-391
>                 URL: https://issues.apache.org/jira/browse/SHIRO-391
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Jan Stamer
>            Assignee: Jared Bunting
>            Priority: Minor
>         Attachments: ThreadContext.java.patch
>
>
> Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.
> The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %X{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.
> Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (SHIRO-391) Enable Principal in Logs using SLF4J MDC

Posted by "Jared Bunting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jared Bunting reassigned SHIRO-391:
-----------------------------------

    Assignee: Jared Bunting
    
> Enable Principal in Logs using SLF4J MDC
> ----------------------------------------
>
>                 Key: SHIRO-391
>                 URL: https://issues.apache.org/jira/browse/SHIRO-391
>             Project: Shiro
>          Issue Type: Improvement
>            Reporter: Jan
>            Assignee: Jared Bunting
>            Priority: Minor
>         Attachments: ThreadContext.java.patch
>
>
> Sometimes it is useful to log the user name. That way it can easily be traced which user faced an exception or where an error occurred.
> The Mapped Diagnostic Context (MDC) of SLF4J can be used for that as it uses the same mechanisms as Shiro already does. That way one can use %{shiroSubject} in the log pattern. This will then be filled with the principal name or left blank.
> Remark: No additional libraries or anything are necessary for that. All that's needed is SLF4J and that's there already.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira