Skip to content

[search] Improve request logging with requester and counts - #11425

Open
nullpacket wants to merge 1 commit into
LandSandBoat:basefrom
nullpacket:search-logging-2072
Open

nullpacket wants to merge 1 commit into
LandSandBoat:basefrom
nullpacket:search-logging-2072

Conversation

@nullpacket

Copy link
Copy Markdown

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Closes #2072. Search-server request logging was sparse and inconsistent. Some handlers were lacking in logging while others were cryptic and noisy.

  • The shared request line now includes the player requester as a bracketed list by source IP.
  • The search-comment, group-list, auction-house, and AH-history handlers now log their parameters and result counts.
  • AH_REQUEST_MORE pagination is gated out of the per-request logs to stop it flooding on AH browsing.
  • Removed the Try find category debug log in GetAHItemsToCategory as it only printed the category id but fired on every query adding to log noise.
  • The requester lookup is skipped when LOG_INFO is off.
  • The player-search handler already logged adequately and was left as-is.

Steps to test these changes

  1. Build and run the server with logging.LOG_INFO = true.
  2. tail/follow log/search-server.log
  3. /sea for a player.
    • Search logs show: request type, requester, query details, results found, number displayed
  4. View a player's seek comment (the target must have one set).
    • Search logs show: request type, requester, target, search comment length
  5. Have a linkshell equipped, navigate the in game menu to linkshell -> select linkshell -> select link list.
    • Search logs show: request type, requester, linkshell ID, results ( number of players in linkshell)
  6. Be in a party and navigate the in game menu to party -> member list
    • Search logs show: request type, requester, party ID, alliance ID, total members
  7. Open the AH and browse a category
    • Search logs show: request type, requester, AH category ID, number of results
    • Search logs no longer show the AH_REQUEST_MORE flooding the search logs due to pagination/loading
  8. View an item's price history
    • Search logs show: request type, requester, itemid, stack value, sale history results

As per LandSandBoat#2072, several search handlers had cryptic or
sparse logs. The shared request line now includes the requester
(by source IP as a bracketed list). The search-comment, group-list,
AH, and AH-history handlers now log their parameters and result counts
in a consistent format. AH_REQUEST_MORE pagination is gated out of the
per-request logs to avoid flooding, and a redundant category-lookup
log was removed.
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.

🔨 Improve logging in Search server

2 participants