Skip to content

Fix the missing Ethon log info#124

Merged
trusche merged 3 commits into
trusche:masterfrom
nulldef:fix-enthon-logging
Sep 17, 2022
Merged

Fix the missing Ethon log info#124
trusche merged 3 commits into
trusche:masterfrom
nulldef:fix-enthon-logging

Conversation

@nulldef
Copy link
Copy Markdown
Contributor

@nulldef nulldef commented Jul 28, 2022

Currently using the httplog with ethon-based http lib we're getting a log with the missing URL in it.

 [httplog] Sending: GET
 [httplog] Header: accept: */*
 [httplog] Header: foo: bar
 [httplog] Connecting: localhost:9292
 [httplog] Status: 200
 [httplog] Benchmark: 0.001562 seconds

So we can memoize the URL in the @http_log variable and use it for logging.

@trusche
Copy link
Copy Markdown
Owner

trusche commented Aug 1, 2022

Hi @nulldef thanks for the PR, I never knew this was an issue. Could I bother you adding a test that fails before and passes after you fix?

@nulldef nulldef force-pushed the fix-enthon-logging branch from eb06413 to f7fb05d Compare August 2, 2022 08:19
@nulldef
Copy link
Copy Markdown
Contributor Author

nulldef commented Aug 2, 2022

Hi @trusche
Sure! I've added some specs for it 👍

The issue basically comes from the Typhoeus gem, it cleans up all the data right after the request is performed.

https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L171
https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/pool.rb#L19

So we don't have any data to log.

@nulldef
Copy link
Copy Markdown
Contributor Author

nulldef commented Aug 10, 2022

HI @trusche!
I just was wondering if you have time to take a look at this PR by any chance :)

@trusche
Copy link
Copy Markdown
Owner

trusche commented Sep 17, 2022

Sorry, missed that! Merging now.

@trusche trusche merged commit 5969c3f into trusche:master Sep 17, 2022
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.

2 participants