You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Goldstein Lyor (JIRA)" <ji...@apache.org> on 2019/02/24 12:57:00 UTC

[jira] [Commented] (SSHD-900) Support for MDC Logging

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

Goldstein Lyor commented on SSHD-900:
-------------------------------------

Not sure I understand what is meant by
{quote}
MDC logging support
{quote}
We are using slf4j - so please feel free to use MDC (note that you have to make sure the underlying logging implementation supports it).

As far as the 
{quote}
remote IP, username, etc.
{quote}
Using the various listeners that one can register you can log whatever you need in whichever manner bests suits your needs - including MDC. Furthermore:

* Please note that MDC is a **singleton** - whereas SSH client/server can maintain multiple sessions - so not sure what and how this would be stored in MDC.
* Who is going to clean up values once sessions are disconnected ?
* What about channels ?
* What about port forwarding information ?

Note that one can easily use the [session/channel attributes|https://github.com/apache/mina-sshd/blob/master/docs/event-listeners.md#sessionlistener] mechanism in order to store user-defined properties and then extract and use them (e.g., MDC). I therefore don't see a general use-case for this feature that we can incorporate into the default code.

> Support for MDC Logging
> -----------------------
>
>                 Key: SSHD-900
>                 URL: https://issues.apache.org/jira/browse/SSHD-900
>             Project: MINA SSHD
>          Issue Type: New Feature
>            Reporter: Marco Zapletal
>            Priority: Minor
>
> MDC logging support (e.g., remote IP, username, etc.) would really be a great enhancement. We checked out the MINA filters ([http://mina.apache.org/mina-project/userguide/ch5-filters/ch5-filters.html)] but it seems they not integrate nicely with SSHD. 
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)