Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

SessionConnector was logging errors to its class-level logger instead of using session-specific logs where a Session object was available.

Changes

  • Replaced three logError() calls with LogUtil.logThrowable(session.getLog(), ...) in:
    • logoutAllSessions(): logout errors
    • logoutAllSessions(): disconnect errors
    • SessionTimerTask.run(): timer processing errors
  • Removed the now-unused logError(SessionID, IoSession, String, Throwable) method
  • Removed the helper method getLogSuffix(SessionID, IoSession) which was only used by logError()

Before:

logError(session.getSessionID(), null, "Error during logout", e);

After:

LogUtil.logThrowable(session.getLog(), "Error during logout", e);

This routes errors to per-session log configuration rather than the generic connector logger, consistent with error logging patterns in Session itself. The cleanup removes dead code that is no longer needed.

Original prompt

This section details on the original issue you should resolve

<issue_title>Replace logError()´ with call to Session.getLog()where applicable inSessionConnector`</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace logError with call to Session.getLog in SessionConnector Replace logError() with Session.getLog() in SessionConnector Dec 18, 2025
Copilot AI requested a review from chrjohn December 18, 2025 16:15
@chrjohn chrjohn added this to the QFJ 3.0.0 milestone Dec 18, 2025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot , is this method still used anywhere? Please remove it after changing the callers to use a session-specific log.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logError() method was not used anywhere else in the codebase. I've removed both the logError() method and its helper method getLogSuffix() in commit 9e29ecf.

…ctor

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI requested a review from chrjohn December 18, 2025 17:45
@chrjohn chrjohn changed the title Replace logError() with Session.getLog() in SessionConnector Replace logError() with Session.getLog() in SessionConnector Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace logError() with call to Session.getLog() where applicable in SessionConnector

2 participants