-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRILL-7417: Add user logged in/out event in info level logs #1880
Conversation
Sample output logs: JDBC/ODBC: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sohami thanks for the PR, overall looks good, please address some minor code review comments.
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/LogInLogOutResources.java
Outdated
Show resolved
Hide resolved
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/LogInLogOutResources.java
Outdated
Show resolved
Hide resolved
@@ -78,7 +78,7 @@ public UserIdentity login(String username, Object credentials, ServletRequest re | |||
// Authenticate the user with configured Authenticator | |||
userAuthenticator.authenticate(username, credentials.toString()); | |||
|
|||
logger.debug("WebUser {} is successfully authenticated", username); | |||
logger.info("WebUser {} logged in from {}:{}", username, request.getRemoteHost(), request.getRemotePort()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.info("WebUser {} logged in from {}:{}", username, request.getRemoteHost(), request.getRemotePort()); | |
logger.info("WebUser {} logged in from {}: {}", username, request.getRemoteHost(), request.getRemotePort()); |
@@ -122,7 +122,8 @@ private UserIdentity spnegoLogin(Object credentials) { | |||
|
|||
// Get the client user short name | |||
final String userShortName = new HadoopKerberosName(clientName).getShortName(); | |||
|
|||
logger.info("WebUser {} logged in from {}:{}", userShortName, request.getRemoteHost(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.info("WebUser {} logged in from {}:{}", userShortName, request.getRemoteHost(), | |
logger.info("WebUser {} logged in from {}: {}", userShortName, request.getRemoteHost(), |
@arina-ielchiieva - Made the changes to add import for logger. |
+1, please squash the commits. |
No description provided.