You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Achim Hügen (Jira)" <ji...@apache.org> on 2021/03/29 09:31:00 UTC

[jira] [Created] (SSHD-1152) Some warnings are never logged

Achim Hügen created SSHD-1152:
---------------------------------

             Summary: Some warnings are never logged
                 Key: SSHD-1152
                 URL: https://issues.apache.org/jira/browse/SSHD-1152
             Project: MINA SSHD
          Issue Type: Bug
    Affects Versions: 2.6.0
            Reporter: Achim Hügen


Some Warnings that are output via a certain warn method in LoggingUtils don't make it into the log files.
Example: ServerUserAuthService#handleUserAuthRequestMessage
{code}
        } catch (Exception e) {
            warn("handleUserAuthRequestMessage({}) Failed ({}) to authenticate using factory method={}: {}",
                    session, e.getClass().getSimpleName(), method, e.getMessage(), e);
        }
{code}

There is a bug in the implementation that checks for "log.isDebugEnabled()" in all cases:
{code}
    public static void warn(Logger log, String message, Object o1, Object o2, Object o3, Object o4, Throwable t) {
        if (log.isDebugEnabled() && t != null) {
            log.warn(message, o1, o2, o3, o4, t);
        } else if (log.isDebugEnabled()) {
            log.warn(message, o1, o2, o3, o4);
        }
    }
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org